mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 21:55:07 -05:00
sources: don't log warning when opening dump file fails
Instead of complaining when the file doesn't exist, which is common when using pool servers, log an informational message when the file is loaded.
This commit is contained in:
@@ -1192,7 +1192,7 @@ FILE *open_dumpfile(SRC_Instance inst, const char *mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
f = fopen(filename, mode);
|
f = fopen(filename, mode);
|
||||||
if (!f)
|
if (!f && mode[0] != 'r')
|
||||||
LOG(LOGS_WARN, LOGF_Sources, "Could not open dump file for %s",
|
LOG(LOGS_WARN, LOGF_Sources, "Could not open dump file for %s",
|
||||||
source_to_string(inst));
|
source_to_string(inst));
|
||||||
|
|
||||||
@@ -1232,6 +1232,9 @@ SRC_ReloadSources(void)
|
|||||||
if (!SST_LoadFromFile(sources[i]->stats, in))
|
if (!SST_LoadFromFile(sources[i]->stats, in))
|
||||||
LOG(LOGS_WARN, LOGF_Sources, "Could not load dump file for %s",
|
LOG(LOGS_WARN, LOGF_Sources, "Could not load dump file for %s",
|
||||||
source_to_string(sources[i]));
|
source_to_string(sources[i]));
|
||||||
|
else
|
||||||
|
LOG(LOGS_INFO, LOGF_Sources, "Loaded dump file for %s",
|
||||||
|
source_to_string(sources[i]));
|
||||||
fclose(in);
|
fclose(in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user