MINOR: log: add a new field "%lc" to implement a per-frontend log counter
authorWilly Tarreau <w@1wt.eu>
Thu, 28 Aug 2014 13:03:15 +0000 (15:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Aug 2014 13:08:14 +0000 (15:08 +0200)
commit7346acb6f1c148782ebaa93d34e7b86a7f8706ae
tree22e61e1a9b5433355b948be546201e8e202e958c
parent4edd6836fcb5e89a44c6c3fe8b6baadf1c3897ee
MINOR: log: add a new field "%lc" to implement a per-frontend log counter

Sometimes it would be convenient to have a log counter so that from a log
server we know whether some logs were lost or not. The frontend's log counter
serves exactly this purpose. It's incremented each time a traffic log is
produced. If a log is disabled using "http-request set-log-level silent",
the counter will not be incremented. However, admin logs are not accounted
for. Also, if logs are filtered out before being sent to the server because
of a minimum level set on the log line, the counter will be increased anyway.

The counter is 32-bit, so it will wrap, but that's not an issue considering
that 4 billion logs are rarely in the same file, let alone close to each
other.
doc/configuration.txt
include/types/log.h
include/types/proxy.h
src/log.c