]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: log: make sess_build_logline() support being called with no stream
authorWilly Tarreau <w@1wt.eu>
Wed, 5 Sep 2018 14:55:15 +0000 (16:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Sep 2018 07:43:06 +0000 (09:43 +0200)
commit09bb27cdeaf4fbb0686121fa8ff156a61da35fad
treeb99e419e5026645a723e7ec008e153b130aeaaf0
parent5cacab63e15e6932d39292b0821897aefca09cc6
MEDIUM: log: make sess_build_logline() support being called with no stream

Till now it was impossible to emit logs from the lower layers only because
a stream was mandatory. From now on it will at least be possible to emit a
log to report a bad request or some timings for example. When the stream
is null, sess_build_logline() will use default values and will extract the
timing information from the session just like stream_new() does, so the
resulting log line is perfectly valid.

The termination state will indicate a proxy error during the request phase
since it is the only realistic use for such a call with no stream.
src/log.c