]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sink: inform the user when logs will be implicitly truncated
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 22 Jun 2023 15:04:43 +0000 (17:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Sep 2023 14:06:39 +0000 (16:06 +0200)
commitfdf82d058b5ce2ce3a99f14e75754888cbe2fde6
tree69a00cd910791b52cd71517c7bb3ef016811445e
parentceaa1ddb06a584e0c93d194e7b3653d73eb008ca
MINOR: sink: inform the user when logs will be implicitly truncated

Consider the following example:

 |log ring@test-ring len 2000 local0
 |
 |ring test-ring
 |  maxlen 1000

This would result in emitted logs being silently truncated to 1000 because
test-ring maxlen is smaller than the log directive maxlen.

In this patch we're adding an extra check in post_sink_resolve() to detect
this kind of confusing setups and warn the user about the implicit
truncation when DIAG mode is on.

This commit depends on:
 - "MINOR: sink: simplify post_sink_resolve function"
src/sink.c