commit edbb60e: [Minor] Log starting sequence
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Feb 9 15:07:06 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-02-09 14:42:49 +0000
URL: https://github.com/rspamd/rspamd/commit/edbb60ec54e6b8cee986b2aa5bdaaac76e273da5
[Minor] Log starting sequence
---
src/libserver/logger/logger.c | 1 +
src/libserver/worker_util.h | 4 ++++
src/rspamd.c | 5 +++++
3 files changed, 10 insertions(+)
diff --git a/src/libserver/logger/logger.c b/src/libserver/logger/logger.c
index cf8ad496f..21c92bbb9 100644
--- a/src/libserver/logger/logger.c
+++ b/src/libserver/logger/logger.c
@@ -150,6 +150,7 @@ rspamd_log_open_emergency (rspamd_mempool_t *pool, gint flags)
logger->flags = flags;
logger->pool = pool;
logger->process_type = "main";
+ logger->pid = getpid ();
const struct rspamd_logger_funcs *funcs = &console_log_funcs;
memcpy (&logger->ops, funcs, sizeof (*funcs));
diff --git a/src/libserver/worker_util.h b/src/libserver/worker_util.h
index 77344ac47..1c1c63dd8 100644
--- a/src/libserver/worker_util.h
+++ b/src/libserver/worker_util.h
@@ -289,6 +289,10 @@ gboolean rspamd_worker_hyperscan_ready (struct rspamd_main *rspamd_main,
rspamd_main->server_pool->tag.tagname, rspamd_main->server_pool->tag.uid, \
G_STRFUNC, \
__VA_ARGS__)
+#define msg_notice_main(...) rspamd_default_log_function (G_LOG_LEVEL_MESSAGE, \
+ rspamd_main->server_pool->tag.tagname, rspamd_main->server_pool->tag.uid, \
+ G_STRFUNC, \
+ __VA_ARGS__)
#define msg_info_main(...) rspamd_default_log_function (G_LOG_LEVEL_INFO, \
rspamd_main->server_pool->tag.tagname, rspamd_main->server_pool->tag.uid, \
G_STRFUNC, \
diff --git a/src/rspamd.c b/src/rspamd.c
index cfaba54d6..e1b69fccd 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -1410,6 +1410,11 @@ main (gint argc, gchar **argv, gchar **env)
detect_priv (rspamd_main);
+ msg_notice_main ("rspamd "
+ RVERSION
+ " is loading configuration, build id: "
+ RID);
+
pworker = &workers[0];
while (*pworker) {
/* Init string quarks */
More information about the Commits
mailing list