diff --git a/examples/main.c b/examples/main.c index 9afee0b9bf6236b341f820e9c51624aba5243223..ee1253062409ec2e787e064a5fb50da2c830d35d 100644 --- a/examples/main.c +++ b/examples/main.c @@ -396,8 +396,12 @@ int main(int argc, char *argv[]) { parser_read_file(paramFileName, params); /* Handle any command-line overrides. */ - if (nparams > 0) + if (nparams > 0) { + message( + "Overwriting values read from the YAML file with command-line " + "values."); for (int k = 0; k < nparams; k++) parser_set_param(params, cmdparams[k]); + } /* And dump the parameters as used. */ // parser_print_params(¶ms); diff --git a/src/parser.c b/src/parser.c index 02970c0526072013c14ee27c4486c8915ec67b25..641e2fdac6c286e0c1e1a1c07f4badcb591112c2 100644 --- a/src/parser.c +++ b/src/parser.c @@ -133,6 +133,8 @@ void parser_set_param(struct swift_params *params, const char *namevalue) { int updated = 0; for (int i = 0; i < params->paramCount; i++) { if (strcmp(name, params->data[i].name) == 0) { + message("Using the value '%s' instead of '%s' for the parameter '%s'", + value, params->data[i].value, params->data[i].name); strcpy(params->data[i].value, value); updated = 1; }