logging different messages to different files
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sathish_Kumar
Posted On:   Tuesday, May 17, 2005 06:39 AM



I want log different messages into different files.

For instance DEBUG messages should be logged in debug.log and I should not log any ERROR messages in the debug.log.
Is there anyway of doing it?

Re: logging different messages to different files

Posted By:   Anonymous  
Posted On:   Friday, June 17, 2005 05:43 AM

Rather than using properties file .Just create one java file,in that make 3 loggers instance .For these loggers use your wished properites like use info for on logger , debug for one logger and exception for another logger and also use different appenders and difference layouts and different filename and location each loggers.

By obtaining this you can very easily achieve your probelm resolution.Because one month back in our project i implimented debug,exp,product loggers with different files

Re: logging different messages to different files

Posted By:   Anonymous  
Posted On:   Tuesday, May 17, 2005 07:09 AM

See http://logging.apache.org/log4j/docs/faq.html#2.9



With the standard log4j config you can only specify a minimum loglevel for each file. If you want to use exact log levels you should have a look at the LevelMatchFilter.

About | Sitemap | Contact