> > Hello >> i would really appreciate it if you could send the steps needed to >> initialize a logger with rolling fileappender useing the C++ classes. I have >> been doing it with the configuration file but now the program needs to be >> shifted towards the C++ classes. >> i tried using the steps given below. >> >> >> logger = Logger::getLogger("MyTesting"); >> LayoutPtr layout = new PatternLayout("[%c] [%d]: [%p] %m\n"); >> logger->setLevel(log4cxx::Level::DEBUG); >> >> RollingFileAppenderPtr appender = new RollingFileAppender(layout, >> "mehrs_log", true); >> appender->setMaxFileSize("100KB"); >> appender->setMaxBackupIndex(10); >> appender->activateOptions(); >> >> logger->addAppender(appender); >> logger->warn("debuggging"); >> LOG4CXX_WARN(logger,"Started "); >> >> The error i get is : >> Program received signal SIGSEGV, Segmentation fault. >> 0x00002aaaaad8aa4e in >> log4cxx::helpers::AppenderAttachableImpl::appendLoopOnAppenders (this=<value >> optimized out>,eve...@0x7fff44f6a5c0) at >> ../include/log4cxx/helpers/objectptr.h:109 >> 109 ../include/log4cxx/helpers/objectptr.h: No such file or directory. >> in ../include/log4cxx/helpers/objectptr.h >> >> I am using the version: log4cxx-0.9.7 ( cant update..uptil now was reading >> the .conf file using propertyconfigurator..) >> Operating System: Linux. >> -- >> Mehrwash Faruqi >> > > > > -- > Mehrwash Faruqi >
-- Mehrwash Faruqi