logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Way to set another log file for one category with different log level
Date Tue, 05 Nov 2002 12:20:45 GMT

I guess you could set up two appenders which are referenced in the root 
logger and then have a filter in each appender specifying which log level 
to output.

Jake

At 08:59 PM 11/5/2002 +0900, you wrote:
>How can I write log4j.proerties to output two different log files for one
>category when each threshold is different?
>
>In other words, I want two output:
>   - error.log     for output errors only
>   - debug.log     for output all logs
>
>The Java code is something like this:
>
>   Logger log = Logger.getLogger("log")
>   log.error("error message");
>   log.warn("warning message");
>
>
>And I want those two files will be:
>
><error.log>
>   error message
>
><debug.log>
>   error message
>   warning message
>
>
>I cannot find out any sample log4j.properties in neither short manual nor
>FAQ.
>
>Thanks in advance,
>
>-------------------------------
>Wataru Fukushima
>PFU LIMITED
>
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message