diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-05 15:54:48 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-05 15:54:48 +0300 |
commit | 063ad836a7e2a61192d3a6ca13b07114c4923c09 (patch) | |
tree | 2d4f27041cab5fca234a7dbaa93d71f9fd5f2133 /src/libserver/cfg_file.h | |
parent | 2068591f5c63765cb3073058ef7074cf71f12a82 (diff) | |
download | rspamd-063ad836a7e2a61192d3a6ca13b07114c4923c09.tar.gz rspamd-063ad836a7e2a61192d3a6ca13b07114c4923c09.zip |
Start variable log format support.
Diffstat (limited to 'src/libserver/cfg_file.h')
-rw-r--r-- | src/libserver/cfg_file.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 5f1abe1b0..416053aba 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -165,6 +165,38 @@ struct rspamd_worker_conf { ucl_object_t *options; /**< other worker's options */ }; +enum rspamd_log_format_type { + RSPAMD_LOG_STRING = 0, + RSPAMD_LOG_MID, + RSPAMD_LOG_QID, + RSPAMD_LOG_USER, + RSPAMD_LOG_ISSPAM, + RSPAMD_LOG_ACTION, + RSPAMD_LOG_SCORES, + RSPAMD_LOG_SYMBOLS, + RSPAMD_LOG_IP, + RSPAMD_LOG_DNS_REQ, + RSPAMD_LOG_SMTP_FROM, + RSPAMD_LOG_MIME_FROM, + RSPAMD_LOG_TIME_REAL, + RSPAMD_LOG_TIME_VIRTUAL, + RSPAMD_LOG_LUA +}; + +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) +}; + +struct rspamd_log_format { + enum rspamd_log_format_type type; + guint flags; + gpointer data; + struct rspamd_log_format *prev, *next; +}; + /** * Structure that stores all config data */ @@ -277,6 +309,8 @@ struct rspamd_config { GList *classify_headers; /**< list of headers using for statistics */ struct module_s **compiled_modules; /**< list of compiled C modules */ struct worker_s **compiled_workers; /**< list of compiled C modules */ + struct rspamd_log_format *log_format; /**< parsed log format */ + gchar *log_format_str; /**< raw log format string */ }; |