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 "Spranger, Steffen" <St...@gft-systems.de> on 2004/02/05 13:01:32 UTC

Keeping debug-logs in error case

Hallo,

I log communication to an external system with e.g. logger.debug(...).
In a catch-block I log errors by logger.error(...).

What I want is, not to keep all the debug-messages in good case, but =
keeping them in an error-case.

I'm wondering if log4j can be configured (or our log statements =
organized) to do so?
And if it does, how?



Best regards
	Steffen Spranger



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


Re: Keeping debug-logs in error case

Posted by Ron Grabowski <ro...@yahoo.com>.
I don't know if log4j supports this, but in log4net its possible to
configure a BufferingForwardingAppender to record log messages at a
certain threshold (ERROR for example). When a log entry of ERROR is
received, the preceeding 512 (user settable via the bufferSize
property) log messages of all levels (DEBUG, INFO, WARN) are written to
the underlying appender. I think there's another thread with sample
code in addition to this one:

http://tinyurl.com/cx64y
http://www.mail-archive.com/log4net-user%40logging.apache.org/msg02212.html

Does log4j support something similiar?

--- James Stauffer <st...@gmail.com> wrote:

> How long would you keep debug statements waiting for an error to
> happen?  Would you want all debug statements or just for specific
> loggers?
> 
> On 2/8/06, Liz <li...@hotmail.com> wrote:
> > Spranger, Steffen <Steffen.Spranger <at> gft-systems.de> writes:
> >
> >
> >
> >  Hallo,
> >
> >  I log communication to an external system with e.g.
> logger.debug(...).
> >  In a catch-block I log errors by logger.error(...).
> >
> >  What I want is, not to keep all the debug-messages in good case,
> but =
> >  keeping them in an error-case.
> >
> >  I'm wondering if log4j can be configured (or our log statements =
> >  organized) to do so?
> >  And if it does, how?
> >
> >  Best regards
> >         Steffen Spranger
> >
> >
> >
> > Hola, segura estoy de que no puedo ayudar a resolver tu problema,
> pero te mando
> > un saludo muy grande, deseando que estes muy bien y que pronto
> alguien te ayude.
> >
> > Un beso con mucho cari�o, Liz
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> 
> 
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> 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: Keeping debug-logs in error case

Posted by James Stauffer <st...@gmail.com>.
How long would you keep debug statements waiting for an error to
happen?  Would you want all debug statements or just for specific
loggers?

On 2/8/06, Liz <li...@hotmail.com> wrote:
> Spranger, Steffen <Steffen.Spranger <at> gft-systems.de> writes:
>
>
>
>  Hallo,
>
>  I log communication to an external system with e.g. logger.debug(...).
>  In a catch-block I log errors by logger.error(...).
>
>  What I want is, not to keep all the debug-messages in good case, but =
>  keeping them in an error-case.
>
>  I'm wondering if log4j can be configured (or our log statements =
>  organized) to do so?
>  And if it does, how?
>
>  Best regards
>         Steffen Spranger
>
>
>
> Hola, segura estoy de que no puedo ayudar a resolver tu problema, pero te mando
> un saludo muy grande, deseando que estes muy bien y que pronto alguien te ayude.
>
> Un beso con mucho cariño, Liz
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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


Re: Keeping debug-logs in error case

Posted by Liz <li...@hotmail.com>.
Spranger, Steffen <Steffen.Spranger <at> gft-systems.de> writes:

 
 
 Hallo,
 
 I log communication to an external system with e.g. logger.debug(...).
 In a catch-block I log errors by logger.error(...).
 
 What I want is, not to keep all the debug-messages in good case, but =
 keeping them in an error-case.

 I'm wondering if log4j can be configured (or our log statements =
 organized) to do so?
 And if it does, how?
 
 Best regards
 	Steffen Spranger
 


Hola, segura estoy de que no puedo ayudar a resolver tu problema, pero te mando
un saludo muy grande, deseando que estes muy bien y que pronto alguien te ayude. 

Un beso con mucho cariño, Liz




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