if (r < 0)
return r;
- // This matches what log.c does.
- bool plog = buffer == LOG_ID_APPS ? true : log_config_get_boolean(&config, "plog", true);
+ // This matches what log.c does. (FIXME: extract to a unified function)
+ bool limiter_apply_to_all_buffers = log_config_get_boolean(&config, "limiter_apply_to_all_buffers", false);
+ bool plog = (buffer != LOG_ID_APPS || limiter_apply_to_all_buffers) ? log_config_get_boolean(&config, "plog", true) : true;
char key[MAX_CONF_KEY_LEN];
r = snprintf(key, sizeof key, "enable_%s", log_name_by_id(buffer));
if (r < 0)
printf("\nLogging buffer status:\n");
const bool plog_default = log_config_get_boolean(conf, "plog", true);
+ const bool limiter_apply_to_all_buffers = log_config_get_boolean(conf, "limiter_apply_to_all_buffers", false);
for (int i = 0; i < LOG_ID_MAX; ++i) {
char key[MAX_CONF_KEY_LEN];
ret = snprintf(key, sizeof key, "enable_%s", log_name_by_id((log_id_t)i));
ret = (is_pipe ? get_stdout_one_pipe : get_stdout_one_nonpipe)(i, conf, &stdout_enabled);
printf("* %s (regular): %s\n"
, log_name_by_id((log_id_t)i)
- , log_config_get_boolean(conf, key, i == LOG_ID_APPS ? plog_default : true) ? "ENABLED" : "DISABLED"
+ , log_config_get_boolean(conf, key, (i != LOG_ID_APPS || limiter_apply_to_all_buffers) ? plog_default : true) ? "ENABLED" : "DISABLED"
);
printf("* %s (stdout): %s\n"
, log_name_by_id((log_id_t)i)