commit d31a116: [Minor] Improve error logging

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jun 8 11:00:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-06-08 11:49:31 +0100
URL: https://github.com/rspamd/rspamd/commit/d31a116278f7e45ed07deba98cfe11c34441233e

[Minor] Improve error logging

---
 src/libserver/cfg_rcl.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index fdd7e455a..73b9a3b1d 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -3107,11 +3107,14 @@ rspamd_rcl_parse_struct_keypair (rspamd_mempool_t *pool,
 			*target = kp;
 		}
 		else {
+			gchar *dump = ucl_object_emit (obj, UCL_EMIT_JSON_COMPACT);
 			g_set_error (err,
 					CFG_RCL_ERROR,
 					EINVAL,
-					"cannot load the keypair specified: %s",
-					ucl_object_key (obj));
+					"cannot load the keypair specified: %s; section: %s; value: %s",
+					ucl_object_key (obj), section->name, dump);
+			free (dump);
+
 			return FALSE;
 		}
 	}


More information about the Commits mailing list