mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
MINOR: log: handle extra log origins in _process_send_log_override()
Thanks to the previous commit, it is now possible to register additional log origins that may be used from log-profile section as 'on' steps. As such, let's make _process_send_log_override() function aware of them by trying to lookup in the tree of extra logging steps in the default switch-case catchall. If the log origin id matches with the id of the extra logging step, we use the associated log format instead of the "any" log format.
This commit is contained in:
parent
818475c5cc
commit
6567e37680
11
src/log.c
11
src/log.c
@ -2932,7 +2932,18 @@ static inline void _process_send_log_override(struct process_send_log_ctx *ctx,
|
||||
step = prof->close;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
struct log_profile_step_extra *extra;
|
||||
|
||||
/* catchall for extra log origins */
|
||||
|
||||
/* check if there is a log step defined for this log origin */
|
||||
extra = container_of_safe(eb32_lookup(&prof->extra, orig),
|
||||
struct log_profile_step_extra, node);
|
||||
if (extra)
|
||||
step = &extra->step;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!step && prof->any)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user