commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [commons-daemon] 01/02: Revert "[DAEMON-414] prunsrv uses its log is before it is initialized. (#13)"
Date Fri, 22 Nov 2019 17:58:13 GMT
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

commit 3e5d6d9e7a07180d1053b14cba5a4e9d14164fd1
Author: Gary Gregory <gardgregory@gmail.com>
AuthorDate: Fri Nov 22 12:56:24 2019 -0500

    Revert "[DAEMON-414] prunsrv uses its log is before it is initialized. (#13)"
    
    This reverts commit ce98c4021e1e32909afb0fc3524bd250dc6766a6.
---
 src/native/windows/apps/prunsrv/prunsrv.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/native/windows/apps/prunsrv/prunsrv.c b/src/native/windows/apps/prunsrv/prunsrv.c
index d854664..a12ccff 100644
--- a/src/native/windows/apps/prunsrv/prunsrv.c
+++ b/src/native/windows/apps/prunsrv/prunsrv.c
@@ -1755,13 +1755,6 @@ 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.");
@@ -1778,6 +1771,12 @@ 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);
 


Mime
View raw message