Once you have a generic Appender object, which could be any one of a
number of appender types, many of which do not have file names, you
should test whether it is an instance of FileAppender and then call
the getFile() method.
if (logger.getAppender("A1") instanceof FileAppender) {
String file = ((FileAppender) logger.getAppender("A1")).getFile();
}
On Jan 30, 2009, at 4:09 PM, Ashish Kulkarni wrote:
HiI need to find out the log file name, and path in Java program,
I tried
logger.getAppender("A1").getName()
I would think would return "A1" since that is the name of the appender.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]