commit d7d26a2: [Minor] Improve logging
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Sep 27 12:56:06 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-09-27 13:54:49 +0100
URL: https://github.com/rspamd/rspamd/commit/d7d26a2a5f8b1af2ff68d275410bc2d3ad0cc44d (HEAD -> master)
[Minor] Improve logging
---
src/libserver/rspamd_symcache.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index 69080eb18..bbe90ec6a 100644
--- a/src/libserver/rspamd_symcache.c
+++ b/src/libserver/rspamd_symcache.c
@@ -942,7 +942,7 @@ rspamd_symcache_save_items (struct rspamd_symcache *cache, const gchar *name)
return TRUE;
}
- msg_info_cache ("cannot open file %s, error %d, %s", path,
+ msg_err_cache ("cannot open file %s, error %d, %s", path,
errno, strerror (errno));
return FALSE;
}
@@ -957,7 +957,7 @@ rspamd_symcache_save_items (struct rspamd_symcache *cache, const gchar *name)
sizeof (rspamd_symcache_magic));
if (write (fd, &hdr, sizeof (hdr)) == -1) {
- msg_info_cache ("cannot write to file %s, error %d, %s", path,
+ msg_err_cache ("cannot write to file %s, error %d, %s", path,
errno, strerror (errno));
rspamd_file_unlock (fd, FALSE);
close (fd);
@@ -1000,7 +1000,7 @@ rspamd_symcache_save_items (struct rspamd_symcache *cache, const gchar *name)
close (fd);
if (rename (path, name) == -1) {
- msg_info_cache ("cannot rename %s -> %s, error %d, %s", path, name,
+ msg_err_cache ("cannot rename %s -> %s, error %d, %s", path, name,
errno, strerror (errno));
(void)unlink (path);
ret = FALSE;
@@ -1251,8 +1251,8 @@ rspamd_symcache_save (struct rspamd_symcache *cache)
/* Try to sync values to the disk */
if (!rspamd_symcache_save_items (cache,
cache->cfg->cache_filename)) {
- msg_err_cache ("cannot save cache data to %s",
- cache->cfg->cache_filename);
+ msg_err_cache ("cannot save cache data to %s: %s",
+ cache->cfg->cache_filename, strerror (errno));
}
}
}
More information about the Commits
mailing list