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 Jonathan Beer <jb...@texadasoftware.com> on 2006/03/14 17:41:26 UTC

ErrorHandler in log4j 1.3

Hello,
 
I'm using log4j1.3-alpha8.
 
I see that in alpha8 the ErrorHandler interface has been deprecated.
 
What is the fallback method that will be used in 1.3 when the appender is
not available (for example, with a DBAppender, if the connection is refused,
or with a FileAppender without the proper permissions)?
 
I thought the ErrorHandler mechanism was fairly useful with just a few
drawbacks.  I was using the FallbackErrorHandler
  - I didn't ever figure out how to have the FallbackErrorHandler check for
the original appender to be available again after a certain period
  - The first message was completely dropped when log4j switched appenders
to the FallbackErrorHandler appender
 
If anybody has any information about fallback appenders in log4j 1.3, or are
using 1.3 with a homegrown work around, please advise.
 
Thanks,
Jonathan


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


Re: ErrorHandler in log4j 1.3

Posted by Curt Arnold <ca...@apache.org>.
On Mar 20, 2006, at 11:20 AM, Jonathan Beer wrote:

> I'm currently using the DBAppender, and I'm looking through the API  
> and I
> don't see anything that leads me to believe there's anything in  
> place for
> handling errors with the appender.  Is this true?  If this is the  
> case, what
> should I be doing to make this to happen?
>
> I've searched the forums but found no useful information.  This  
> leads me to
> believe that either (a) people are not looking ahead to the 1.3  
> release and
> using the 1.2.x ErrorHandler interface, (b) nothing ever fails and  
> therefore
> there is no need for a backup appender, or (c) I have missed something
> obvious.  What are others doing to achieve the fallback in case of  
> appender
> error?
>
> Thanks,
> Jonathan


The recent focus on 1.3 development has been to restore compatibility  
with log4j 1.2 and save breaking changes for log4j 2.0.  I believe  
that log4j 1.2 style use of ErrorHandler has been broken in the log4j  
1.3 code base, but I don't know that for sure and it isn't near to  
top of the list of things to modify to restore log4j 1.2  
compatibility.  If you'd like to investigate how error reporting has  
changed from log4j 1.2 and provide patches or suggestions to restore  
log4j 1.2 behavior, it would be very helpful.

I do not anticipate that we would want to introduce any new error  
reporting architecture in log4j 1.3.  However, it would be good to  
think about that in the log4j 2.0 development cycle.


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


RE: ErrorHandler in log4j 1.3

Posted by Jonathan Beer <jb...@texadasoftware.com>.
I'm currently using the DBAppender, and I'm looking through the API and I
don't see anything that leads me to believe there's anything in place for
handling errors with the appender.  Is this true?  If this is the case, what
should I be doing to make this to happen?

I've searched the forums but found no useful information.  This leads me to
believe that either (a) people are not looking ahead to the 1.3 release and
using the 1.2.x ErrorHandler interface, (b) nothing ever fails and therefore
there is no need for a backup appender, or (c) I have missed something
obvious.  What are others doing to achieve the fallback in case of appender
error? 

Thanks,
Jonathan 

PS: I'm sorry if this message was posted before, I tried to sent this last
week, but I can't find it in the log4j-user list. 

-----Original Message-----
From: Ceki Gülcü [mailto:listid@qos.ch] 
Sent: Tuesday, March 14, 2006 3:02 PM
To: Log4J Users List
Subject: Re: ErrorHandler in log4j 1.3


The ErrorHandler idea sounds good but in practice it leads to a false sense
of security, even worse, under certain circumstances its indiscriminate use
can result in application failure. I think it is better to leave the
implementation of the fallback mechanism to the failing appender instead of
a general approach which does yield good results under fire.

At 05:41 PM 3/14/2006, Jonathan Beer wrote:
>Hello,
>
>I'm using log4j1.3-alpha8.
>
>I see that in alpha8 the ErrorHandler interface has been deprecated.
>
>What is the fallback method that will be used in 1.3 when the appender 
>is not available (for example, with a DBAppender, if the connection is 
>refused, or with a FileAppender without the proper permissions)?
>
>I thought the ErrorHandler mechanism was fairly useful with just a few 
>drawbacks.  I was using the FallbackErrorHandler
>   - I didn't ever figure out how to have the FallbackErrorHandler 
>check for the original appender to be available again after a certain
period
>   - The first message was completely dropped when log4j switched 
>appenders to the FallbackErrorHandler appender
>
>If anybody has any information about fallback appenders in log4j 1.3, 
>or are using 1.3 with a homegrown work around, please advise.
>
>Thanks,
>Jonathan

--
Ceki Gülcü
http://ceki.blogspot.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: ErrorHandler in log4j 1.3

Posted by Jonathan Beer <jb...@texadasoftware.com>.
I'm currently using the DBAppender, and I'm looking through the API and I
don't see anything that leads me to believe there's anything in place for
handling errors with the appender.  Is this true?  If this is the case, what
should I be doing to make this to happen?

I've searched the forums but found no useful information.  This leads me to
believe that either (a) people are not looking ahead to the 1.3 release and
using the 1.2.x ErrorHandler interface, (b) nothing ever fails and therefore
there is no need for a backup appender, or (c) I have missed something
obvious.  What are others doing to achieve the fallback in case of appender
error? 

Thanks,
Jonathan 


-----Original Message-----
From: Ceki Gülcü [mailto:listid@qos.ch] 
Sent: Tuesday, March 14, 2006 3:02 PM
To: Log4J Users List
Subject: Re: ErrorHandler in log4j 1.3


The ErrorHandler idea sounds good but in practice it leads to a false sense
of security, even worse, under certain circumstances its indiscriminate use
can result in application failure. I think it is better to leave the
implementation of the fallback mechanism to the failing appender instead of
a general approach which does yield good results under fire.

At 05:41 PM 3/14/2006, Jonathan Beer wrote:
>Hello,
>
>I'm using log4j1.3-alpha8.
>
>I see that in alpha8 the ErrorHandler interface has been deprecated.
>
>What is the fallback method that will be used in 1.3 when the appender 
>is not available (for example, with a DBAppender, if the connection is 
>refused, or with a FileAppender without the proper permissions)?
>
>I thought the ErrorHandler mechanism was fairly useful with just a few 
>drawbacks.  I was using the FallbackErrorHandler
>   - I didn't ever figure out how to have the FallbackErrorHandler 
>check for the original appender to be available again after a certain
period
>   - The first message was completely dropped when log4j switched 
>appenders to the FallbackErrorHandler appender
>
>If anybody has any information about fallback appenders in log4j 1.3, 
>or are using 1.3 with a homegrown work around, please advise.
>
>Thanks,
>Jonathan

--
Ceki Gülcü
http://ceki.blogspot.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: ErrorHandler in log4j 1.3

Posted by Ceki Gülcü <li...@qos.ch>.
The ErrorHandler idea sounds good but in practice it leads to a false sense 
of security, even worse, under certain circumstances its indiscriminate use 
can result in application failure. I think it is better to leave the 
implementation of the fallback mechanism to the failing appender instead of 
a general approach which does yield good results under fire.

At 05:41 PM 3/14/2006, Jonathan Beer wrote:
>Hello,
>
>I'm using log4j1.3-alpha8.
>
>I see that in alpha8 the ErrorHandler interface has been deprecated.
>
>What is the fallback method that will be used in 1.3 when the appender is
>not available (for example, with a DBAppender, if the connection is refused,
>or with a FileAppender without the proper permissions)?
>
>I thought the ErrorHandler mechanism was fairly useful with just a few
>drawbacks.  I was using the FallbackErrorHandler
>   - I didn't ever figure out how to have the FallbackErrorHandler check for
>the original appender to be available again after a certain period
>   - The first message was completely dropped when log4j switched appenders
>to the FallbackErrorHandler appender
>
>If anybody has any information about fallback appenders in log4j 1.3, or are
>using 1.3 with a homegrown work around, please advise.
>
>Thanks,
>Jonathan

-- 
Ceki Gülcü
http://ceki.blogspot.com/


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