[
https://issues.apache.org/jira/browse/LOG4NET-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712127#action_12712127
]
Tom Cooley commented on LOG4NET-1:
----------------------------------
I have a fairly simple (if not naive) solution to the Fallback appender
concept, something I wish were available right now.
Why not add the following to the IAppender interface:
IAppender FallbackAppender { get; set; }
Implement the new property in the AppenderSkeleton, and then change the catch
block of the two DoAppend methods to be something like:
if (FallbackAppender != null)
{
FallbackAppender.DoAppend(loggingEvent);
}
else
{
ErrorHandler.Error("Failed in DoAppend", ex);
}
>From a configuration perspective, you identify the FallbackAppender at each
>appender level, allowing a hierarchy of fallbacks. If it reaches the end of
>the chain and still cannot append the event, the ErrorHandler.Error finally
>kicks in.
Too simple? I'm fairly new to log4net and have not spent a huge amount of time
getting to know the code, but that seems like a fairly simple extension point
that has fewer touch points than handling this within the ErrorHandler.
> Support Fallback Appenders
> --------------------------
>
> Key: LOG4NET-1
> URL: https://issues.apache.org/jira/browse/LOG4NET-1
> Project: Log4net
> Issue Type: New Feature
> Components: Appenders, Core
> Affects Versions: 1.2.9
> Environment: From sourceforge
> Reporter: Nicko Cadell
> Fix For: v.Next
>
>
> Basically, I'm looking for the ability to set up a hierarchy of appenders so
> that if a log to an ADONETAppender fails, log4net could then log to one of
> more "back-up" appenders, for example, a RollingLogFile or SMTP.
> Thanks,
> Leo
> Leo J. Hart IV
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.