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 Elias Ross <er...@m-qube.com> on 2003/10/20 19:41:55 UTC
Request for enhancment in PatternLayout
For the application I am working on, I receive log messages from
multiple machines. It would be handy to include a new PatternLayout
character sequence %h (or %H or %a) to include the hostname that
generated the trap. %h{1} would return the hostname without the domain.
Also, being able to reference system properties in the PatternLayout
would be handy, such as %j{java.version} or %j{instance.id} in my case.
Being able to reference system properties in general (for turning off
appenders) seems like a good idea.
I could easily add this feature myself to a private branch, but I figure
it's probably something better to be made available to all. I can write
the patch, if that's easier.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: Request for enhancment in PatternLayout
Posted by Ceki Gülcü <ce...@qos.ch>.
How about creating new PatternConverter classes ?
See https://www.qos.ch/logging/PatternLayout.html for details.
At 10:41 AM 10/20/2003 -0700, Elias Ross wrote:
>For the application I am working on, I receive log messages from
>multiple machines. It would be handy to include a new PatternLayout
>character sequence %h (or %H or %a) to include the hostname that
>generated the trap. %h{1} would return the hostname without the domain.
>
>Also, being able to reference system properties in the PatternLayout
>would be handy, such as %j{java.version} or %j{instance.id} in my case.
>Being able to reference system properties in general (for turning off
>appenders) seems like a good idea.
>
>I could easily add this feature myself to a private branch, but I figure
>it's probably something better to be made available to all. I can write
>the patch, if that's easier.
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
--
Ceki Gülcü
For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
import org.apache.Facetime;
ApacheCon US 2003, 18-21 November http://apachecon.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org