Log to different file with log4cxx
I want to log to different files in my code. How can i do that in Log4cxx with xml configuration or programatically in code... Suppose that I have 1.k,k+1,..n components. They run in the same application I want component k log to Logger-k, k+1 component log to Logger-k+1 at the same time Update: Logger.addAppender() approach: log4cxx::helpers::Pool p; std::string paramAppender = "appxNormalAppender"; std::string paramFileName = "\\Logs\\MyLog.txt"; LOG4CXX_DECODE_CHAR(logAppender, paramAppender ); LOG4CXX_DECODE_CHAR(logFileName, paramFileName ); FileAppenderPtr fileAppender = logger-