Commit b9fd5a6f authored by Robert Schmidt's avatar Robert Schmidt

config module: make it less verbose

parent 006b68fa
...@@ -208,9 +208,11 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions ...@@ -208,9 +208,11 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
} }
} /* for loop on options */ } /* for loop on options */
printf("[CONFIG] %s: %i/%i parameters successfully set \n", printf_params(cfg,
((prefix == NULL)?"(root)":prefix), "[CONFIG] %s: %i/%i parameters successfully set \n",
numdefvals,numoptions ); prefix == NULL ? "(root)" : prefix,
numdefvals,
numoptions);
if (fatalerror == 1) { if (fatalerror == 1) {
fprintf(stderr,"[CONFIG] fatal errors found when assigning %s parameters \n", fprintf(stderr,"[CONFIG] fatal errors found when assigning %s parameters \n",
......
...@@ -70,7 +70,7 @@ int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_s ...@@ -70,7 +70,7 @@ int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_s
str=config_setting_get_string_elem(setting,i); str=config_setting_get_string_elem(setting,i);
if (str==NULL) { if (str==NULL) {
printf("[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i); printf_params(cfg, "[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i);
} else { } else {
snprintf(cfgoptions->strlistptr[i], DEFAULT_EXTRA_SZ, "%s",str); snprintf(cfgoptions->strlistptr[i], DEFAULT_EXTRA_SZ, "%s",str);
st++; st++;
...@@ -481,9 +481,12 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions, ...@@ -481,9 +481,12 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
} }
} /* for loop on options */ } /* for loop on options */
printf("[LIBCONFIG] %s: %i/%i parameters successfully set, (%i to default value)\n", printf_params(cfg,
((prefix == NULL)?"(root)":prefix), "[LIBCONFIG] %s: %i/%i parameters successfully set, (%i to default value)\n",
status,numoptions,numdefvals ); prefix == NULL ? "(root)" : prefix,
status,
numoptions,
numdefvals);
if (fatalerror == 1) { if (fatalerror == 1) {
fprintf(stderr,"[LIBCONFIG] fatal errors found when processing %s \n", libconfig_privdata.configfile ); fprintf(stderr,"[LIBCONFIG] fatal errors found when processing %s \n", libconfig_privdata.configfile );
...@@ -517,8 +520,7 @@ int config_libconfig_getlist(configmodule_interface_t *cfg, ...@@ -517,8 +520,7 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
status = ParamList->numelt = config_setting_length(setting); status = ParamList->numelt = config_setting_length(setting);
printf_params(cfg, "[LIBCONFIG] %i %s in config file %s \n", ParamList->numelt, listpath, libconfig_privdata.configfile); printf_params(cfg, "[LIBCONFIG] %i %s in config file %s \n", ParamList->numelt, listpath, libconfig_privdata.configfile);
} else { } else {
printf("[LIBCONFIG] list %s not found in config file %s \n", printf_params(cfg, "[LIBCONFIG] list %s not found in config file %s \n", listpath, libconfig_privdata.configfile);
listpath,libconfig_privdata.configfile );
ParamList->numelt= 0; ParamList->numelt= 0;
status = -1; status = -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment