Posted By:
Anonymous
Posted On:
Monday, March 13, 2006 01:38 AM
Hi, I want to create two logger instance for the same class, For Example: class A { Logger m_log = Logger.getInstance(A.class); Logger s_log = Logger.getInstance(A.class); m_log.info("hello"); s_log.error("hi"); } And i populate two different appenders with differnt values for pattern, layout etc... and i will add these two appenders separately to the two logger instace. The problem is these two loggers i.e m_log and s_log are not logging messages independently to diffrent log files [ i.e log files specified while creating appenders]. I can find both m_log and s_log messages in both the files. Is there
More>>
Hi,
I want to create two logger instance for the same class, For Example:
class A
{
Logger m_log = Logger.getInstance(A.class);
Logger s_log = Logger.getInstance(A.class);
m_log.info("hello");
s_log.error("hi");
}
And i populate two different appenders with differnt values for pattern, layout etc... and i will add these two appenders separately to the two logger instace.
The problem is these two loggers i.e m_log and s_log are not logging messages independently to diffrent log files [ i.e log files specified while creating appenders]. I can find both m_log and s_log messages in both the files. Is there any way by which i can separately log messages to two different files.
Please help me out, it will be very use full for me.
Thanks & Regards
-Sandeep
<<Less