diff --git a/repmgrd.c b/repmgrd.c index bd80c5ed..26b17d49 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -382,6 +382,12 @@ main(int argc, char **argv) PQfinish(myLocalConn); myLocalConn = establishDBConnection(local_options.conninfo, true); primaryConn = myLocalConn; + + if (*local_options.logfile) + { + freopen(local_options.logfile, "a", stderr); + } + update_registration(); } got_SIGHUP = false;