diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-14 15:45:56 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-14 15:45:56 +0000 |
commit | 577a34501b40fcc5982c5ddfc326ddf1c66b13de (patch) | |
tree | a8d7c3b32624f68a415ad198a7b3070f57a7f8fd /src/libserver/cfg_file.h | |
parent | c11f4f3b96eef519b64b9a98daf93ade96f50bf4 (diff) | |
download | rspamd-577a34501b40fcc5982c5ddfc326ddf1c66b13de.tar.gz rspamd-577a34501b40fcc5982c5ddfc326ddf1c66b13de.zip |
[Feature] Rework logging configuration for rspamadm case
Diffstat (limited to 'src/libserver/cfg_file.h')
-rw-r--r-- | src/libserver/cfg_file.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 2a6c29955..7e306fe5c 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -64,6 +64,15 @@ enum rspamd_log_type { RSPAMD_LOG_FILE }; +enum rspamd_log_cfg_flags { + RSPAMD_LOG_FLAG_DEFAULT = 0, + RSPAMD_LOG_FLAG_SYSTEMD = (1 << 0), + RSPAMD_LOG_FLAG_COLOR = (1 << 1), + RSPAMD_LOG_FLAG_RE_CACHE = (1 << 2), + RSPAMD_LOG_FLAG_USEC = (1 << 3), + RSPAMD_LOG_FLAG_RSPAMADM = (1 << 4), +}; + struct rspamd_worker_log_pipe { gint fd; gint type; @@ -228,12 +237,12 @@ enum rspamd_log_format_type { }; enum rspamd_log_format_flags { - RSPAMD_LOG_FLAG_DEFAULT = 0, - RSPAMD_LOG_FLAG_OPTIONAL = (1 << 0), - RSPAMD_LOG_FLAG_MIME_ALTERNATIVE = (1 << 1), - RSPAMD_LOG_FLAG_CONDITION = (1 << 2), - RSPAMD_LOG_FLAG_SYMBOLS_SCORES = (1 << 3), - RSPAMD_LOG_FLAG_SYMBOLS_PARAMS = (1 << 4) + RSPAMD_LOG_FMT_FLAG_DEFAULT = 0, + RSPAMD_LOG_FMT_FLAG_OPTIONAL = (1 << 0), + RSPAMD_LOG_FMT_FLAG_MIME_ALTERNATIVE = (1 << 1), + RSPAMD_LOG_FMT_FLAG_CONDITION = (1 << 2), + RSPAMD_LOG_FMT_FLAG_SYMBOLS_SCORES = (1 << 3), + RSPAMD_LOG_FMT_FLAG_SYMBOLS_PARAMS = (1 << 4) }; struct rspamd_log_format { @@ -324,11 +333,7 @@ struct rspamd_config { GList *debug_symbols; /**< symbols to debug */ GHashTable *debug_modules; /**< logging modules to debug */ struct rspamd_cryptobox_pubkey *log_encryption_key; /**< encryption key for logs */ - gboolean log_color; /**< output colors for console output */ - gboolean log_extended; /**< log extended information */ - gboolean log_systemd; /**< special case for systemd logger */ - gboolean log_re_cache; /**< show statistics about regexps */ - gboolean log_usec; /**< log microseconds if possible */ + guint log_flags; /**< logging flags */ guint log_error_elts; /**< number of elements in error logbuf */ guint log_error_elt_maxlen; /**< maximum size of error log element */ struct rspamd_worker_log_pipe *log_pipes; |