diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-10-30 15:32:35 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-10-30 15:32:35 +0000 |
commit | bae5cd020f84fbf84cbbe446f0726287604f150a (patch) | |
tree | 0ab0f64ee5e71acb51028a858005f1636c6e85f9 /src/libserver/cfg_rcl.cxx | |
parent | 81412f8b22d364ae94820fb368f669dabf5d4b94 (diff) | |
download | rspamd-bae5cd020f84fbf84cbbe446f0726287604f150a.tar.gz rspamd-bae5cd020f84fbf84cbbe446f0726287604f150a.zip |
[Project] Preliminary support of JSON logging
Diffstat (limited to 'src/libserver/cfg_rcl.cxx')
-rw-r--r-- | src/libserver/cfg_rcl.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.cxx b/src/libserver/cfg_rcl.cxx index e7828ff90..3f6ca2c56 100644 --- a/src/libserver/cfg_rcl.cxx +++ b/src/libserver/cfg_rcl.cxx @@ -283,6 +283,11 @@ rspamd_rcl_logging_handler(rspamd_mempool_t *pool, const ucl_object_t *obj, cfg->log_flags |= RSPAMD_LOG_FLAG_SYSTEMD; } + val = ucl_object_lookup_any(obj, "json", "log_json", nullptr); + if (val && ucl_object_toboolean(val)) { + cfg->log_flags |= RSPAMD_LOG_FLAG_JSON; + } + val = ucl_object_lookup(obj, "log_re_cache"); if (val && ucl_object_toboolean(val)) { cfg->log_flags |= RSPAMD_LOG_FLAG_RE_CACHE; |