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 sh...@checkfree.com on 2003/10/09 20:07:23 UTC

MemoryAppender

Most of our production applications have log threshold set to INFO most of
the time. Request data and response is not logged at INFO level. But to
trouble-shoot an ERROR, the support folks like to have detailed information
about the request that saw the error. It is not always possible to recreate
that error, and there is not much benefit of chaging the log level later. I
am sure this is a familiar issue.

One solution to the above problem is to use an MemoryAppender for DEBUG
level and capture the data required for troubleshooting for each request in
a Collection that stores this info for, say last 50 requests, and dumps
this to another appender on a predefined event. The predefined event could
be a FATAL error or a user initiated event.

Is there a similar Appender available in the distribution or the sandbox ?

Thanks
Shuchi

Re: MemoryAppender

Posted by Paul Smith <pa...@lawlex.com.au>.
This is exactly what the SMTPAppender does, uses a sliding window
(BufferSize property) to hold the events until a triggering event occurs
(by default an ERROR level event).

cheers,

Paul Smith

On Fri, 2003-10-10 at 04:07, shmittal@checkfree.com wrote:
> Most of our production applications have log threshold set to INFO most
> of
> the time. Request data and response is not logged at INFO level. But to
> trouble-shoot an ERROR, the support folks like to have detailed
> information
> about the request that saw the error. It is not always possible to
> recreate
> that error, and there is not much benefit of chaging the log level
> later. I
> am sure this is a familiar issue.
> 
> One solution to the above problem is to use an MemoryAppender for DEBUG
> level and capture the data required for troubleshooting for each request
> in
> a Collection that stores this info for, say last 50 requests, and dumps
> this to another appender on a predefined event. The predefined event
> could
> be a FATAL error or a user initiated event.
> 
> Is there a similar Appender available in the distribution or the sandbox
> ?
> 
> Thanks
> Shuchi


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