gint log_level; /**< log level trigger */
gchar *log_file; /**< path to logfile in case of file logging */
gboolean log_buffered; /**< whether logging is buffered */
+ gboolean log_silent_workers; /**< silence info messages from workers */
guint32 log_buf_size; /**< length of log buffer */
const ucl_object_t *debug_ip_map; /**< turn on debugging for specified ip addresses */
gboolean log_urls; /**< whether we should log URLs */
else if (g_ascii_strcasecmp (log_level, "info") == 0) {
cfg->log_level = G_LOG_LEVEL_INFO | G_LOG_LEVEL_MESSAGE;
}
+ else if (g_ascii_strcasecmp (log_level, "message") == 0) {
+ cfg->log_level = G_LOG_LEVEL_MESSAGE;
+ }
+ else if (g_ascii_strcasecmp (log_level, "silent") == 0) {
+ cfg->log_level = G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO;
+ cfg->log_silent_workers = TRUE;
+ }
else if (g_ascii_strcasecmp (log_level, "debug") == 0) {
cfg->log_level = G_LOG_LEVEL_DEBUG;
}
/* Do silent log reopen to avoid collisions */
rspamd_log_close (rspamd_main->logger);
+
+
+ if (rspamd_main->cfg->log_silent_workers) {
+ rspamd_main->cfg->log_level = G_LOG_LEVEL_MESSAGE;
+ rspamd_set_logger (rspamd_main->cfg, cf->type,
+ &rspamd_main->logger, rspamd_main->server_pool);
+ }
+
rspamd_log_open (rspamd_main->logger);
wrk->start_time = rspamd_get_calendar_ticks ();