Log a message when persisted configurations are used

If no message is logged, it will be very hard to figure out where some
configurations are coming from. For this reason, it's good to log a
message whenever a persistent configuration change is taken into use.
This commit is contained in:
Markus Mäkelä
2016-12-16 10:28:06 +02:00
parent 11d1875399
commit bb9b5a87c1

View File

@ -646,8 +646,9 @@ config_load_and_process(const char* filename, bool (*process_config)(CONFIG_CONT
const char* persist_cnf = get_config_persistdir();
mxs_mkdir_all(persist_cnf, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
if (is_directory(persist_cnf))
if (is_directory(persist_cnf) && contains_cnf_files(persist_cnf))
{
MXS_NOTICE("Loading generated configuration files from '%s'", persist_cnf);
DUPLICATE_CONTEXT p_dcontext;
/**
* We need to initialize a second duplicate context for the