"log-steps" was already ignored if directly defined in a backend section,
however, when defined in a defaults section it was inherited to all
proxies no matter their capability (ie: including backends).
As configurations often contain more backends than frontends, this would
result in wasted memory given that the log-steps setting is only
considered on frontends.
Let's fix that by preventing the inheritance from defaults section to
anything else than frontends. Also adjust the documentation to mention
that the setting in not relevant for backends.
with log-profiles is really interesting to have fine-grained control over
logs automatically generated by haproxy during transaction processing.
+ This setting is only relevant on frontends, it is ignored on backends.
+
See also : "log-profile"
log-tag <string>
{
struct logger *tmplogger;
char *tmpmsg = NULL;
- struct eb32_node *node;
+ struct eb32_node *node = NULL;
/* set default values from the specified default proxy */
* drop the const in order to use EB tree API, please note however
* that the operations performed below should theoretically be read-only
*/
- node = eb32_first((struct eb_root *)&defproxy->conf.log_steps);
+ if (curproxy->cap & PR_CAP_FE) // don't inherit on backends
+ node = eb32_first((struct eb_root *)&defproxy->conf.log_steps);
while (node) {
struct eb32_node *new_node;