mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 23:26:30 +00:00
repmgr: always log to STDERR even if log facility defined
This commit is contained in:
9
log.c
9
log.c
@@ -142,7 +142,7 @@ log_verbose(int level, const char *fmt, ...)
|
||||
|
||||
|
||||
bool
|
||||
logger_init(t_configuration_options *opts, const char *ident)
|
||||
logger_init(t_configuration_options *opts, const char *ident, bool stderr_only)
|
||||
{
|
||||
char *level = opts->loglevel;
|
||||
char *facility = opts->logfacility;
|
||||
@@ -176,6 +176,13 @@ logger_init(t_configuration_options *opts, const char *ident)
|
||||
stderr_log_warning(_("Invalid log level \"%s\" (available values: DEBUG, INFO, NOTICE, WARNING, ERR, ALERT, CRIT or EMERG)\n"), level);
|
||||
}
|
||||
|
||||
/*
|
||||
* STDERR only logging requested - finish here without setting up any further
|
||||
* logging facility.
|
||||
*/
|
||||
if (stderr_only == true)
|
||||
return true;
|
||||
|
||||
if (facility && *facility)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user