How do I configure Log4J to send different levels to different appenders

2007-07-04 Thread Mikael Ståldal
I have two appenders, MAIN_LOG and DEBUG_LOG. I have the loggers set up to match Java class hierarchy as recommended. I have two interesting codebases, "com.mycompany" and "com.othercompany". I want to send DEBUG and higher from "com.mycompany" and WARN and higher from "com.othercompany" to MA

Re: How do I configure Log4J to send different levels to different appenders

2007-07-04 Thread Norbert Toth-Gati
Hi Mikael, You may try to configure the following categories: You may need to configure all the thirdparty logs to end up in the following appenders: Hope that hel

Re: How do I configure Log4J to send different levels to different appenders

2007-07-04 Thread Mikael Ståldal
Norbert Toth-Gati wrote: You may try to configure the following categories: It doesn't work. I end up with an empty MAIN_LOG and the following error message: log4j:ERROR Attempted to append to closed appender n

Re: How do I configure Log4J to send different levels to different appenders

2007-07-04 Thread Norbert Toth-Gati
Hi, Concerning the :"log4j:ERROR Attempted to append to closed appender named [MAIN_LOG]." Please follow the link, as a similar problem is discussed: http://www.mail-archive.com/[EMAIL PROTECTED]/msg01365.html Yep, you cannot use root-element for that. Regards, Norbert On 7/4/07, Mikael Ståldal

Re: How do I configure Log4J to send different levels to different appenders

2007-07-04 Thread Mikael Ståldal
Norbert Toth-Gati wrote: Concerning the :"log4j:ERROR Attempted to append to closed appender named [MAIN_LOG]." Please follow the link, as a similar problem is discussed: http://www.mail-archive.com/[EMAIL PROTECTED]/msg01365.html I have read that thread, and it explains why the solution you pr

Re: How do I configure Log4J to send different levels to different appenders

2007-07-04 Thread Curt Arnold
On Jul 4, 2007, at 7:16 AM, Mikael Ståldal wrote: Norbert Toth-Gati wrote: Concerning the :"log4j:ERROR Attempted to append to closed appender named [MAIN_LOG]." Please follow the link, as a similar problem is discussed: http://www.mail-archive.com/[EMAIL PROTECTED]/ msg01365.html I have

Re: How do I configure Log4J to send different levels to different appenders

2007-07-05 Thread Mikael Ståldal
Curt Arnold wrote: Set root threshold to debug, attach both appenders to root. Write custom filters for your rules and attach the filters to the appenders. By "custom filter", do you mean writing my own Java class implementing org.apache.log4j.spi.Filter? Is it really not possible to config