repmgr: always log to STDERR even if log facility defined

This commit is contained in:
Ian Barwick
2016-11-23 08:55:55 +09:00
parent 26f73686e5
commit b54f98ed8a
6 changed files with 19 additions and 10 deletions

View File

@@ -832,14 +832,12 @@ main(int argc, char **argv)
}
/*
* Initialize the logger. If verbose command line parameter was input,
* make sure that the log level is at least INFO. This is mainly useful
* for STANDBY CLONE. That doesn't require a configuration file where a
* logging level might be specified at, but it often requires detailed
* logging to troubleshoot problems.
* Initialize the logger. We'll request STDERR logging only to ensure the
* repmgr command never has its output diverted to a logging facility,
* which makes little sense for a command line program.
*/
logger_init(&options, progname());
logger_init(&options, progname(), true);
if (runtime_options.verbose)
logger_set_verbose();