From 25f68bb28315350eb9d1bce9cc70b64cb8a1e8df Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 8 Aug 2018 15:40:54 +0900 Subject: [PATCH] repmgrd: report version number *after* logger initialisation This ensures the version number always makes it into the log destination. Implements GitHub #487. --- HISTORY | 1 + doc/appendix-release-notes.sgml | 8 ++++++++ repmgrd.c | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 163040d4..ca35e934 100644 --- a/HISTORY +++ b/HISTORY @@ -2,6 +2,7 @@ 4.1.1 2018-??-?? repmgrd: ensure that sending SIGHUP always results in the log file being reopened; GitHub #485 (Ian) + repmgrd: report version number *after* logger initialisation; GitHub #487 (Ian) 4.1.0 2018-07-31 repmgr: change default log_level to INFO, add documentation; GitHub #470 (Ian) diff --git a/doc/appendix-release-notes.sgml b/doc/appendix-release-notes.sgml index b78051e7..8ef40233 100644 --- a/doc/appendix-release-notes.sgml +++ b/doc/appendix-release-notes.sgml @@ -34,6 +34,14 @@ (GitHub #485). + + + + repmgrd: report version number after + logger initialisation. (GitHub #487). + + + diff --git a/repmgrd.c b/repmgrd.c index a985b5dd..ed7f6b61 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -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();