This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Question: How to let different loggers write to different log files? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Question: How to let different loggers write to different log files?" Watch "Question: How to let different loggers write to different log files?" New topic
Author

Question: How to let different loggers write to different log files?

Yongping Wang
Ranch Hand

Joined: May 15, 2001
Posts: 40
Say, I have two different loggers in a class, A and B. Now I like to see any log message generated from A is written into a.log and any message from B goes to b.log.
It seems the log4j doesn't support it (via configuration file-log4j.properties)
Any comments?
Thanks
Y.W
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Question: How to let different loggers write to different log files?
 
Similar Threads
Log4j - How to direct log messages to their respective log message file
Customize Logger Problem
log4j category
NX: Logging using FileHandler
Seperate configuration file for seperate logger in log4j