RSPAMD_LOG_FLAG_RE_CACHE = (1 << 2),
RSPAMD_LOG_FLAG_USEC = (1 << 3),
RSPAMD_LOG_FLAG_RSPAMADM = (1 << 4),
+ RSPAMD_LOG_FLAG_ENFORCED = (1 << 5),
};
struct rspamd_worker_log_pipe {
logger->log_type = cfg->log_type;
logger->log_facility = cfg->log_facility;
- logger->log_level = cfg->log_level;
+
+ if (!(logger->flags & RSPAMD_LOG_FLAG_ENFORCED)) {
+ logger->log_level = cfg->log_level;
+ }
+
logger->log_buffered = cfg->log_buffered;
logger->log_silent_workers = cfg->log_silent_workers;
logger->log_buf_size = cfg->log_buf_size;
/* Setup logger */
if (verbose) {
cfg->log_level = G_LOG_LEVEL_DEBUG;
- cfg->log_flags |= RSPAMD_LOG_FLAG_USEC;
+ cfg->log_flags |= RSPAMD_LOG_FLAG_USEC|RSPAMD_LOG_FLAG_ENFORCED;
}
else {
cfg->log_level = G_LOG_LEVEL_MESSAGE;