repmgr: pass explicitly provided log level when executing repmgr remotely

This makes it possible to return log output when executing repmgr
remotely at a different level to the one defined in the remote
repmgr's repmgr.conf.

This is particularly useful when DEBUG output is required.
This commit is contained in:
Ian Barwick
2019-09-17 15:30:21 +09:00
parent 98e96f4375
commit 10f00b8822
4 changed files with 54 additions and 2 deletions

View File

@@ -3167,6 +3167,18 @@ make_remote_repmgr_path(PQExpBufferData *output_buf, t_node_info *remote_node_re
"%s -f %s ",
progname(),
remote_node_record->config_file);
/*
* If --log-level was explicitly supplied, pass that through
* to the remote repmgr client too.
*/
if (runtime_options.log_level[0] != '\0')
{
appendPQExpBuffer(output_buf,
" -L %s ",
runtime_options.log_level);
}
}