You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by DARYL HANDLEY <da...@trendwestresorts.com> on 2001/08/18 02:03:45 UTC
Setting different patterns for priorities
Has anyone figured out a way to configure log4j so that the log pattern will
be influenced by the priority of the message logged ?
When I log a DEBUG message, I want to print out the class name, method, and
line number that the logging message occured on using the %l option for the
pattern layout. When I log an INFO, WARN, ERROR, or FATAL, I do not want
to include this information as I understand that the operation is expensive
and do not wish to incur the extra cost.
I have given though to turning it on/off for all messages while
debugging/not debugging, but ultimately, I would like a way to control the
pattern layout for each type of message.
========================
Daryl Handley
Software Developer
Trendwest Resorts Inc
darylh@trendwestresorts.com
(425)498-2728
========================
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: Setting different patterns for priorities
Posted by Robert Leftwich <di...@mail.ix.net.au>.
At 10:03 AM 18/08/2001, DARYL HANDLEY wrote:
>Has anyone figured out a way to configure log4j so that the log pattern will
>be influenced by the priority of the message logged ?
>
>When I log a DEBUG message, I want to print out the class name, method, and
>line number that the logging message occured on using the %l option for the
>pattern layout. When I log an INFO, WARN, ERROR, or FATAL, I do not want
>to include this information as I understand that the operation is expensive
>and do not wish to incur the extra cost.
>
>I have given though to turning it on/off for all messages while
>debugging/not debugging, but ultimately, I would like a way to control the
>pattern layout for each type of message.
Check the recent thread titled "Assigning Layouts to Priorities"
HTH
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org