From: ss ak <ss...@gm...> - 2009-08-24 21:01:00
|
Hi, I want to write to log file which appends.... 1.It writes into a file but does not append??it writes to a new file everytime....what is wrong in this... 2.I set to debug level, LOG4CPLUS_DEBUG(logger,logstring.c_str()); LOG4CPLUS_ERROR(logger,logstring.c_str()); Both get printed.I mean same message is written into the file,2 times..Should it write only once. here is the code log4cplus::BasicConfigurator config; config.configure(); log4cplus::Logger logger = Logger::getInstance("main"); log4cplus::SharedAppenderPtr fileapp(new log4cplus::FileAppender("logfile.log")); logger.addAppender(fileapp); logger.setLogLevel(log4cplus::DEBUG_LOG_LEVEL); Please someone help me... thanks, SS |