repmgrd: report version number *after* logger initialisation

This ensures the version number always makes it into the log destination.

Implements GitHub #487.
This commit is contained in:
Ian Barwick
2018-08-08 15:40:54 +09:00
parent 730f67258c
commit 25f68bb283
3 changed files with 11 additions and 2 deletions

View File

@@ -320,8 +320,6 @@ main(int argc, char **argv)
strncpy(config_file_options.log_level, cli_log_level, MAXLEN);
}
log_notice(_("repmgrd (repmgr %s) starting up"), REPMGR_VERSION);
/*
* -m/--monitoring-history, if provided, will override repmgr.conf's
* monitoring_history; this is for backwards compatibility as it's
@@ -349,6 +347,8 @@ main(int argc, char **argv)
logger_init(&config_file_options, progname());
log_notice(_("repmgrd (%s %s) starting up"), progname(), REPMGR_VERSION);
if (verbose)
logger_set_verbose();