Improve logging of included config files

This commit is contained in:
Daniel Pinto 2020-05-06 23:34:32 +01:00
parent 42dfcd0ae3
commit cce16a939c
5 changed files with 6 additions and 6 deletions

View File

@ -151,6 +151,8 @@ config_get_lines_aux(const char *string, config_line_t **result, int extended,
if (allow_include && !strcmp(k, "%include") && handle_include) {
tor_free(k);
include_used = 1;
log_notice(LD_CONFIG, "Processing configuration path \"%s\" at "
"recursion level %d.", v, recursion_level);
config_line_t *include_list;
if (handle_include(v, recursion_level, extended, &include_list,
@ -161,9 +163,6 @@ config_get_lines_aux(const char *string, config_line_t **result, int extended,
tor_free(v);
return -1;
}
log_notice(LD_CONFIG, "Included configuration file or "
"directory at recursion level %d: \"%s\".",
recursion_level, v);
*next = include_list;
if (list_last)
next = &list_last->next;

View File

@ -152,6 +152,7 @@ config_process_include(const char *path, int recursion_level, int extended,
int rv = -1;
SMARTLIST_FOREACH_BEGIN(config_files, const char *, config_file) {
log_notice(LD_CONFIG, "Including configuration file \"%s\".", config_file);
config_line_t *included_config = NULL;
config_line_t *included_config_last = NULL;
if (config_get_included_config(config_file, recursion_level, extended,

View File

@ -1 +1 @@
Included configuration .*directory at recursion level 1.*included
Processing configuration path \".*included\" at recursion level 1\.

View File

@ -1 +1 @@
Included configuration file .*at recursion level 2.*nested\.inc
Processing configuration path \".*nested\.inc\" at recursion level 2\.

View File

@ -1 +1 @@
Included configuration .*directory at recursion level 1.*included
Processing configuration path \".*included\" at recursion level 1\.