]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: log: add logger flags
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 29 May 2024 14:50:42 +0000 (16:50 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 13 Jun 2024 13:43:09 +0000 (15:43 +0200)
Logger struct may benefit from having a "flags" struct member to set
or remove different logger states. For that, we reuse an existing
4 bytes hole in the logger struct to store a 2 bytes flags integer,
leaving the struct with a 2-bytes hole now.

include/haproxy/log-t.h

index bbfc7cdc28720cf6d43feb34698e553a88f6e9fd..3e5b6900a55ed3958154c7dff85cc5712509cd08 100644 (file)
@@ -231,10 +231,16 @@ struct log_target {
        uint16_t flags;
 };
 
+enum logger_flags {
+       LOGGER_FL_NONE     = 0x00,
+};
+
 struct logger {
        struct list list;
        struct log_target target;
        struct smp_info lb;
+       uint16_t flags;
+       /* 2 bytes hole */
        enum log_fmt format;
        int facility;
        int level;