[Log4cplus-devel] How do I get log4cplus to print the "header" every time?
Logging Framework for C++
Brought to you by:
wilx
|
From: Jim <ji...@fa...> - 2010-02-24 22:35:27
|
I'm obviously doing something wrong. My output looks like:
2010-02-24 17:08:22.138 DEBUG 3055020960 main loggerbase.cpp:3944
Starting diagloop with 120
-timing 118
-timing 119
Running procs are 0
-Input stage activity 1
patrol detaching
timing 0
but the only output I'm doing is via calls like:
Thread::sleep (50000);
outString << "timing "<<timing << endl;
LOG4CPLUS_DEBUG (root, outString.str ());
inside of a forever loop. Obviously there are some other calls in the
loop, but this is the bit of code that generates the "timing" output.
outString is
ostringstream outString;
Defined earlier in the function.
I'm making a wild guess that the time isn't changing from call to call?
root is defined as:
Logger root;
and assigned as
root = Logger::getInstance ("main");
It was preceded by:
PropertyConfigurator::doConfigure ("/etc/VA/log4cplus.properties");
And that file looks like:
log4cplus.rootLogger=DEBUG, R
log4cplus.logger.filelogger=DEBUG, R
log4cplus.appender.R=log4cplus::RollingFileAppender
log4cplus.appender.R.File=/var/log/VA/logger.log
log4cplus.appender.R.MaxFileSize=15MB
log4cplus.appender.R.MaxBackupIndex=10
log4cplus.appender.R.layout=log4cplus::PatternLayout
log4cplus.appender.R.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S.%q}
%-5p %t %c %l %m%n
Thanks for any guidance.
Jim.
|