Added missing logging to externcmd.c
Not all failures caused an error to be logged.
This commit is contained in:
@ -107,12 +107,16 @@ EXTERNCMD* externcmd_allocate(char* argstr)
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_ERROR("Failed to parse argument string for external command: %s",
|
||||
argstr);
|
||||
externcmd_free(cmd);
|
||||
cmd = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_ERROR("Memory allocation for external command parameters failed when "
|
||||
"processing '%s'.", argstr);
|
||||
free(cmd);
|
||||
free(argv);
|
||||
cmd = NULL;
|
||||
|
||||
@ -785,7 +785,8 @@ monitor_launch_script(MONITOR* mon, MONITOR_SERVERS* ptr, char* script)
|
||||
|
||||
if (cmd == NULL)
|
||||
{
|
||||
MXS_ERROR("Failed to initialize script: %s", script);
|
||||
MXS_ERROR("Failed to initialize script '%s'. See previous errors for the "
|
||||
"cause of this failure.", script);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -795,8 +796,7 @@ monitor_launch_script(MONITOR* mon, MONITOR_SERVERS* ptr, char* script)
|
||||
|
||||
if (externcmd_execute(cmd))
|
||||
{
|
||||
MXS_ERROR("Failed to execute script "
|
||||
"'%s' on server state change event %s.",
|
||||
MXS_ERROR("Failed to execute script '%s' on server state change event %s.",
|
||||
script, mon_get_event_name(ptr));
|
||||
}
|
||||
externcmd_free(cmd);
|
||||
|
||||
Reference in New Issue
Block a user