conf: improve log message for failed additions in sources reload

Describe the error status in the log message when adding a source from
sourcedir failed.
This commit is contained in:
Miroslav Lichvar
2023-09-11 16:14:53 +02:00
parent 37deee7140
commit aa8196328c
5 changed files with 37 additions and 1 deletions

3
conf.c
View File

@@ -1734,7 +1734,8 @@ reload_source_dirs(void)
if (s == NSR_UnresolvedName) {
unresolved++;
} else if (s != NSR_Success) {
LOG(LOGS_ERR, "Could not add source %s", source->params.name);
LOG(LOGS_ERR, "Could not add source %s : %s",
source->params.name, NSR_StatusToString(s));
/* Mark the source as not present */
source->params.name[0] = '\0';