Re: Different levels to different appenders

2008-03-03 Thread Mikael Ståldal
Mikael Ståldal skrev: then set the logger levels for both hierarchies to DEBUG, and write yourself a simple custom Filter implementation that accepts/denies events based on your logic, and attach a separate configured instance of that filter to each of the appenders (accepting/denying as the ca

RE: Different levels to different appenders

2008-02-27 Thread Michael Erskine
Personally, I'd just log everything to a single file and filter it with a simple Perl script either after the fact or in a POE file tail app. Just my two cents - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Different levels to different appenders

2008-02-27 Thread Mikael Ståldal
Paul Smith skrev: Why not simply have all the events your interested in together, in context, in one log file? Have one File appender, and tweak the levels to emit/silence loggers you care/don't care about? I'm personally not sure of the advantage of seeking information across 2 log files.

Re: Different levels to different appenders

2008-02-26 Thread Paul Smith
On 27/02/2008, at 12:51 AM, Mikael Ståldal wrote: Paul Smith skrev: If this truly is what you want, Are you implying that it would be a bad idea? Why would it be a bad idea? Why not simply have all the events your interested in together, in context, in one log file? Have one File appe

Re: Different levels to different appenders

2008-02-26 Thread Mikael Ståldal
Paul Smith skrev: If this truly is what you want, Are you implying that it would be a bad idea? Why would it be a bad idea? then set the logger levels for both hierarchies to DEBUG, and write yourself a simple custom Filter implementation that accepts/denies events based on your logic, and

Re: Different levels to different appenders

2008-02-25 Thread Paul Smith
On 21/02/2008, at 11:00 PM, Mikael Ståldal wrote: 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.mycomp

Re: Different levels to different appenders

2008-02-25 Thread Mikael Ståldal
Jim Reilly skrev: I think your main problem here is that you cannot put the same logger name ="xxx" >and have that xxx be the same string, to be able to seperate by logging level. I am aware of that problem. Now I need a solution. >I think your only way would be to have multiple appenders tha

Re: Different levels to different appenders

2008-02-21 Thread Jim Reilly
BUG LEVEL: -Jim - Original Message From: Mikael Ståldal <[EMAIL PROTECTED]> To: log4j-user@logging.apache.org Sent: Thursday, February 21, 2008 7:00:36 AM Subject: Different lev

Re: Different levels to different appenders

2008-02-21 Thread Jim Reilly
> To: log4j-user@logging.apache.org Sent: Thursday, February 21, 2008 7:00:36 AM Subject: Different levels to different appenders 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 codebas

Different levels to different appenders

2008-02-21 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-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

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-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 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: 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 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

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