]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Improve error logging
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Jun 2021 10:49:31 +0000 (11:49 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Jun 2021 10:49:31 +0000 (11:49 +0100)
src/libserver/cfg_rcl.c

index fdd7e455a4a819fd040bfe7f146a72817ea19c16..73b9a3b1d11de50b77c2c4d97ebdec5d86689b23 100644 (file)
@@ -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;
                }
        }