logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From F Kurzawa <majortay...@yahoo.com>
Subject RE: Decorating output before RollingFileAppender
Date Tue, 27 Jul 2004 16:36:58 GMT
Hi James,

Sorry I wasn't clearer.

I need to be able to decorate the output BEFORE RollingFileAppender. This is
because I need to have different lines laid out out differently depending on
which logger that they came from. I don't have enough control with the single
PatternLayout within RFA to get the different formatting that I need.

The intuitively obvious approach was to use multiple RollingFileAppenders, each
of which would write to the same file. But RollingFileAppender becomes very
confused if other RFA's are writing to the same file, and the file starts
getting rotated willy-nilly as each RFA steps on the other.

So that approach won't work.

Regards,

Frank

--- James Stauffer <jstauffe@spscommerce.com> wrote:

> RollingFileAppender extends FileAppender so it takes a PatternLayout also.
> 
> James Stauffer
> 
> 
> -----Original Message-----
> From: F Kurzawa [mailto:majortaylor@yahoo.com] 
> Sent: Tuesday, July 27, 2004 10:55 AM
> To: Log4J Users List
> Subject: Decorating output before RollingFileAppender
> 
> 
> I want to format and modify my log4j output prior to sending to a
> RollingFileAppender.
> 
> If there were functionality that would allow me to easily apply a
> PatternLayout prior to sending to a RollingFileAppender that would be ideal.
> 
> I can insert an AsyncAppender before my RollingFileAppender, but
> AsyncAppender does not take a PatternLayout parameter so it doesn't help.
> 
> In fact, the only two appenders that take PatternLayout arguments are the
> *FileAppender's and ConsoleAppender.
> 
> Is there a simple way to decorate my output with a PatternLayout (or some
> similar functionality) prior to its arrival in a RollingFileAppender?
> 
> Thanks in advance,
> 
> Frank
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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


Mime
View raw message