]> jfr.im git - irc/UndernetIRC/undernet-development-env.git/blame - patches/log4c-alpine-compat+log-paths.patch
Initial import of undernet development env
[irc/UndernetIRC/undernet-development-env.git] / patches / log4c-alpine-compat+log-paths.patch
CommitLineData
446026a1
SW
1diff --git src/main.cc src/main.cc
2index 00fd8474..81d05797 100644
3--- src/main.cc
4+++ src/main.cc
5@@ -50,6 +50,7 @@
6 #ifdef ENABLE_LOG4CPLUS
7 #include <log4cplus/configurator.h>
8 #include <log4cplus/logger.h>
9+#include <log4cplus/initializer.h>
10 #endif
11
12 // main() must be in the global namespace
13@@ -188,7 +189,7 @@ while( autoConnect )
14 // TODO: This will have to be updated when running
15 // in background.
16 {
17- std::ofstream pidFile( "gnuworld.pid", std::ios::trunc |
18+ std::ofstream pidFile( "/gnuworld/log/gnuworld.pid", std::ios::trunc |
19 std::ios::out ) ;
20 if( !pidFile )
21 {
22@@ -224,8 +225,8 @@ return 0 ;
23
24 xServer::xServer( int argc, char** argv )
25 : eventList( EVT_NOOP ),
26- elogFileName( "debug.log" ),
27- socketFileName( "socket.log" ),
28+ elogFileName( "/gnuworld/log/debug.log" ),
29+ socketFileName( "/gnuworld/log/socket.log" ),
30 configFileName( CONFFILE )
31 {
32 logSocket = true ;
33@@ -234,7 +235,8 @@ doDebug = true ;
34
35 std::cout << "Before configuration" << endl;
36 #ifdef ENABLE_LOG4CPLUS
37-log4cplus::PropertyConfigurator::doConfigure("logging.properties");
38+log4cplus::Initializer initializer;
39+log4cplus::PropertyConfigurator::doConfigure("/gnuworld/etc/logging.properties");
40 #endif
41
42 optind = 0 ;