MINOR: log/sink: detect when log maxlen exceeds sink size
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 23 Jun 2023 13:56:58 +0000 (15:56 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Sep 2023 14:06:39 +0000 (16:06 +0200)
commitceaa1ddb06a584e0c93d194e7b3653d73eb008ca
treed5e7b537486a326dc60da26e7032765ae73d5a56
parentd499485aa9d2d709a727668728743672c37462fd
MINOR: log/sink: detect when log maxlen exceeds sink size

To prevent logs from being silently (and unexpectly droppped) at runtime,
we check that the maxlen parameter from the log directives are
strictly inferior to the targeted ring size.

      |global
      |     tune.bufsize 16384
      |     log tcp@127.0.0.1:514 len 32768
      |     log myring@127.0.0.1:514 len 32768
      |ring myring
      |     # no explicit size

On such configs, a diag warning will be reported.

This commit depends on:
 - "MINOR: sink: simplify post_sink_resolve function"
 - "MINOR: ring: add a function to compute max ring payload"
src/sink.c