Skip to content
Snippets Groups Projects
Commit 8e48eec4 authored by Jan David Mol's avatar Jan David Mol
Browse files

bug 1362: fixed log4cplus in Storage

parent 2f760cff
No related branches found
No related tags found
No related merge requests found
# Configure the loggers # Configure the loggers
log4cplus.rootLogger=INFO, STDOUT log4cplus.rootLogger=DEBUG, STDOUT
#log4cplus.logger.TRC=INFO
log4cplus.logger.TRC=INFO log4cplus.logger.TRC=INFO
log4cplus.logger.LCS.Common=FATAL, STDOUT #log4cplus.logger.LCS.Common=FATAL, STDOUT
# Define the appenders # Define the appenders
log4cplus.appender.STDOUT=log4cplus::ConsoleAppender log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%d-%m %H:%M:%S.%q} %-5p %c{9} - %m [%.25l]%n log4cplus.appender.STDOUT.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S.%q} %-5p %m%n
log4cplus.appender.STDERR=log4cplus::ConsoleAppender #log4cplus.appender.STDERR=log4cplus::ConsoleAppender
log4cplus.appender.STDERR.layout=log4cplus::PatternLayout #log4cplus.appender.STDERR.layout=log4cplus::PatternLayout
log4cplus.appender.STDERR.layout.ConversionPattern=%D{%d-%m %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n #log4cplus.appender.STDERR.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n
log4cplus.appender.STDERR.logToStdErr=true #log4cplus.appender.STDERR.logToStdErr=true
#log4cplus.appender.FILE=log4cplus::RollingFileAppender
#log4cplus.appender.FILE.File=${LOG4CPLUS_LOGFILENAME}.log
#log4cplus.appender.FILE.MaxFileSize=10MB
#log4cplus.appender.FILE.MaxBackupIndex=2
#log4cplus.appender.FILE.layout=log4cplus::PatternLayout
#log4cplus.appender.FILE.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n
log4cplus.appender.DUMP=log4cplus::NullAppender
...@@ -147,18 +147,9 @@ int main(int argc, char *argv[]) ...@@ -147,18 +147,9 @@ int main(int argc, char *argv[])
string logPrefix = "[obs unknown] "; string logPrefix = "[obs unknown] ";
#if defined HAVE_LOG4CPLUS #if defined HAVE_LOG4CPLUS
using namespace log4cplus; INIT_LOGGER( "Storage" );
using namespace log4cplus::helpers;
helpers::Properties traceProp;
traceProp.setProperty("log4cplus.rootLogger", "DEBUG, STDOUT");
traceProp.setProperty("log4cplus.logger.TRC", "DEBUG");
traceProp.setProperty("log4cplus.appender.STDOUT", "log4cplus::ConsoleAppender");
traceProp.setProperty("log4cplus.appender.STDOUT.layout", "log4cplus::PatternLayout");
traceProp.setProperty("log4cplus.appender.STDOUT.layout.ConversionPattern", "%x %D{%d-%m-%y %H:%M:%S} %-5p %n");
PropertyConfigurator(traceProp).configure();
#elif defined HAVE_LOG4CXX #elif defined HAVE_LOG4CXX
#error LOG4CXX support is broken (nonsensical?) -- please fix this code if you want to use it
Context::initialize(); Context::initialize();
setLevel("Global",8); setLevel("Global",8);
#else #else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment