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 Pat Farrell <pf...@pfarrell.com> on 2009/11/16 14:42:35 UTC

how to use EnhancedPatternLayout

In another thread, it was suggested that I convert from using

PatternLayout to EnhancedPatternLayout

so I changed all occurances of PatternLayout to EnhancedPatternLayout in
my log4j.properties file. A typical line now looks like:

log4j.appender.fnfbookfile.layout=org.apache.log4j.EnhancedPatternLayout


When I run the program, I get errors from log4j:
log4j:ERROR No layout set for the appender named [daemon].
log4j:ERROR No layout set for the appender named [pat].

Did I guess the wrong format? Do I need to use a different
layout.ConversionPattern?

Do I need an additional jar file of libraries that contain the
backported enhancements?

Thanks
Pat

-- 
Pat Farrell
http://www.pfarrell.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: how to use EnhancedPatternLayout

Posted by "Green, Kay" <Ka...@McKesson.com>.
I am not seeing log4j extras jar in apache-log4j-1.2.15.zip.
Where is this log4j extras jar file and is the name log4j_extras.jar?

Kay Green
11000 Westmoor Circle
Westminster, CO 80021
Office: 720 239-4639
Email: kay.green@mckesson.com
 
McKesson Provider Technologies
 
"Remember Life should NOT be a journey to the grave with the intention
of arriving safely in an attractive and well preserved body, but rather
to skid in sideways, chocolate in one hand, Mojito in the other, body
thoroughly used up, totally worn out and screaming "WOO HOO what a
ride!"  
Confidentiality Notice: This email message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies of the original message.
-----Original Message-----
From: Yair Ogen [mailto:yairogen@gmail.com] 
Sent: Monday, November 16, 2009 8:17 AM
To: Log4J Users List
Subject: Re: how to use EnhancedPatternLayout

do you have log4j extras jar in your classpath?

On Mon, Nov 16, 2009 at 3:42 PM, Pat Farrell <pf...@pfarrell.com>
wrote:

> In another thread, it was suggested that I convert from using
>
> PatternLayout to EnhancedPatternLayout
>
> so I changed all occurances of PatternLayout to EnhancedPatternLayout
in
> my log4j.properties file. A typical line now looks like:
>
>
log4j.appender.fnfbookfile.layout=org.apache.log4j.EnhancedPatternLayout
>
>
> When I run the program, I get errors from log4j:
> log4j:ERROR No layout set for the appender named [daemon].
> log4j:ERROR No layout set for the appender named [pat].
>
> Did I guess the wrong format? Do I need to use a different
> layout.ConversionPattern?
>
> Do I need an additional jar file of libraries that contain the
> backported enhancements?
>
> Thanks
> Pat
>
> --
> Pat Farrell
> http://www.pfarrell.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: how to use EnhancedPatternLayout

Posted by Pat Farrell <pf...@pfarrell.com>.
Curt Arnold wrote:
> http://logging.apache.org/log4j/companions/extras/index.html and
> http://logging.apache.org/log4j/companions/extras/download.html.
> 
> Not all that big, but that was an expressed concern. 

Thanks.

You really should have a link to this on the front landing page for
Log4j 1.2, I googled it many times before I found it. Since it fixes
known bugs, it really should be more obvious where to find it.

If I may, how about including the jar file along with the original
log4j1.2.x.jar in the distribution zip/tar.gz. That way, you would get
it, and still allow engineers to decide if they need it for their actual
deployment.

In a web server, typically deployed with gigabytes of ram and multiple
cores, the size can't matter, but for something embedded, it makes sense
to give folks a choice.

Thanks
pat

-- 
Pat Farrell
http://www.pfarrell.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: how to use EnhancedPatternLayout

Posted by Curt Arnold <ca...@apache.org>.
On Nov 16, 2009, at 11:17 AM, Pat Farrell wrote:

> Yair Ogen wrote:
>> do you have log4j extras jar in your classpath?
>
> Did know I needed it, so no
> Where do I find it?
>
> Slightly OT, but why not just include the classes in the standard
> distribution? Is it that big?
>

http://logging.apache.org/log4j/companions/extras/index.html and http://logging.apache.org/log4j/companions/extras/download.html 
.

Not all that big, but that was an expressed concern.  It was placed in  
a separate jar since we thought it would evolve and release more  
frequently than log4j proper and so we could still have log4j 1.2 only  
have a JDK 1.3 dependency and put all the JDK 1.4 dependent general  
purpose stuff.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: how to use EnhancedPatternLayout

Posted by Pat Farrell <pf...@pfarrell.com>.
Yair Ogen wrote:
> do you have log4j extras jar in your classpath?

Did know I needed it, so no
Where do I find it?

Slightly OT, but why not just include the classes in the standard
distribution? Is it that big?

-- 
Pat Farrell
http://www.pfarrell.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: how to use EnhancedPatternLayout

Posted by Yair Ogen <ya...@gmail.com>.
do you have log4j extras jar in your classpath?

On Mon, Nov 16, 2009 at 3:42 PM, Pat Farrell <pf...@pfarrell.com> wrote:

> In another thread, it was suggested that I convert from using
>
> PatternLayout to EnhancedPatternLayout
>
> so I changed all occurances of PatternLayout to EnhancedPatternLayout in
> my log4j.properties file. A typical line now looks like:
>
> log4j.appender.fnfbookfile.layout=org.apache.log4j.EnhancedPatternLayout
>
>
> When I run the program, I get errors from log4j:
> log4j:ERROR No layout set for the appender named [daemon].
> log4j:ERROR No layout set for the appender named [pat].
>
> Did I guess the wrong format? Do I need to use a different
> layout.ConversionPattern?
>
> Do I need an additional jar file of libraries that contain the
> backported enhancements?
>
> Thanks
> Pat
>
> --
> Pat Farrell
> http://www.pfarrell.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>