This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push: new ce98c40 [DAEMON-414] prunsrv uses its log is before it is initialized. (#13) ce98c40 is described below commit ce98c4021e1e32909afb0fc3524bd250dc6766a6 Author: Gary Gregory <garydgreg...@users.noreply.github.com> AuthorDate: Thu Nov 21 14:26:13 2019 -0500 [DAEMON-414] prunsrv uses its log is before it is initialized. (#13) * [DAEMON-414] prunsrc uses its log is before it is initialized. * tabs -> spaces. * Move log message along with log init code. * Dang tabs. --- src/native/windows/apps/prunsrv/prunsrv.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/native/windows/apps/prunsrv/prunsrv.c b/src/native/windows/apps/prunsrv/prunsrv.c index da889b3..bf2d12c 100644 --- a/src/native/windows/apps/prunsrv/prunsrv.c +++ b/src/native/windows/apps/prunsrv/prunsrv.c @@ -1742,6 +1742,13 @@ void __cdecl main(int argc, char **argv) /* Create the main Pool */ gPool = apxPoolCreate(NULL, 0); + apxLogOpen(gPool, SO_LOGPATH, SO_LOGPREFIX, SO_LOGROTATE); + apxLogLevelSetW(NULL, SO_LOGLEVEL); + apxLogWrite(APXLOG_MARK_DEBUG "Apache Commons Daemon procrun (%s %d-bit) logging initialized.", + PRG_VERSION, PRG_BITS); + if (SO_LOGROTATE) + apxLogWrite(APXLOG_MARK_DEBUG "Log will rotate each %d seconds.", SO_LOGROTATE); + /* Parse the command line */ if ((lpCmdline = apxCmdlineParse(gPool, _options, _commands, _altcmds)) == NULL) { apxLogWrite(APXLOG_MARK_ERROR "Invalid command line arguments."); @@ -1758,12 +1765,6 @@ void __cdecl main(int argc, char **argv) } } - apxLogOpen(gPool, SO_LOGPATH, SO_LOGPREFIX, SO_LOGROTATE); - apxLogLevelSetW(NULL, SO_LOGLEVEL); - apxLogWrite(APXLOG_MARK_DEBUG "Apache Commons Daemon procrun log initialized."); - if (SO_LOGROTATE) - apxLogWrite(APXLOG_MARK_DEBUG "Log will rotate each %d seconds.", SO_LOGROTATE); - apxLogWrite(APXLOG_MARK_INFO "Apache Commons Daemon procrun (%s %d-bit) started.", PRG_VERSION, PRG_BITS);