Re: [Log4cplus-devel] [log4cplus] Getting filname and path of RollingFileAppender
Logging Framework for C++
Brought to you by:
wilx
From: Václav Z. <vha...@gm...> - 2013-08-20 19:34:01
|
On 08/20/2013 04:59 PM, Harald Pauli wrote: > Hi, > > first of all, many thanks for log4cplus. It is a good platform for logging. > My problem is that I need to get the complete path to the log file that > is written by a RollingFileAppender and the only key I have is the > logger name. I already found the way to the appender via getInstance() > and getAppender() but I'm stuck there. > > Is there a way to solve this issue? At this point there is no way to retrieve the file name. This would have to be solved by adding some, e.g., getFilename(), accessor to the FileAppender class. In any case, there will be no path normalization, what the class receives in ctor or in properties that will be stored in FileAppender::filename member variable. Feel free to send a patch implementing such FileAppender::getFilename() function. -- VZ |