Log4J : Output information from different classes into different log files
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   viju_padmanabhan
Posted On:   Monday, March 6, 2006 11:50 AM

Is it possible to output information from different classes into different log files ?

If so, please help me configure the xml file for this purpose. Specifically, what do I ned to include under the information in the xml file

Thanks.

Re: Log4J : Output information from different classes into different log files

Posted By:   ankush_purwar  
Posted On:   Monday, March 6, 2006 02:18 PM

If you don't want to extend log-4j classes. Then it's a very simple way just configure so many loggers and so many appenders in your xml file.
Say you have two classes A and B
logger name ="A"
appender-ref="AFile"

logger name ="B"
appender-ref="BFile"

But as you will grow in files you need to configure as many as loggers and appenders.

Hope you understands what is the best for you .
About | Sitemap | Contact