| Author |
Log4j: How to retrieve RollingFileAppender's file name and path?
|
Guy Home
Greenhorn
Joined: Aug 23, 2008
Posts: 2
|
|
Hi, Can anyone tell me how I can retrieve the file name and path of my Log4j log file from within my java application code? i.e how can I get my app to return log4j.appender.R.File below as held in my log4j.properties? # ***** R is set to be a RollingFileAppender. log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=/blah/xxx.log I'm sure it ought to be pretty simple so many thinaks if you can offier me the answer.
|
 |
Guy Home
Greenhorn
Joined: Aug 23, 2008
Posts: 2
|
|
I did work out my own answer to this one, so for anyone else who might need it: This would output: "Logging to: \blah\xxx.log" I've used this successfully in http://gmdx.net/log4j/
|
 |
 |
|
|
subject: Log4j: How to retrieve RollingFileAppender's file name and path?
|
|
|