[ 
https://issues.apache.org/jira/browse/LOG4NET-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682061#action_12682061
 ] 

Ron Grabowski commented on LOG4NET-200:
---------------------------------------

Have you thought about writing an error handler that sends an email when an 
appender goes offline?

public class SendMailOnceErrorHandler : IErrorHandler
    {
        private bool firstTime = true;

        public void Error(string message, Exception e, ErrorCode errorCode)
        {
            if (firstTime)
            {
                // sendMail(message, e, errorCode);
                firstTime = false;

                if (LogLog.InternalDebugging && !LogLog.QuietMode)
                {
                    LogLog.Error(declaringType, "[" + m_prefix + "] ErrorCode: 
" + errorCode.ToString() + ". " + message, e);
                }

            }
        }

        public void Error(string message, Exception e)
        {
            Error(message, e, ErrorCode.GenericFailure);
        }

        public void Error(string message)
        {
            Error(message, null, ErrorCode.GenericFailure);
        }
    }

> Log4Net Dll stops logging after 1 or 2 days
> -------------------------------------------
>
>                 Key: LOG4NET-200
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-200
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: IIS 6.0
> Windows server 2003 (SP1)
> .Net Framework 2.0 Web Application
>            Reporter: Christophe Chevalier
>            Priority: Critical
>             Fix For: v.Next
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> Observation : The Log4Net  service stops logging after 1 or 2 days
> Server reboot fixes the problem.
> IIS services reboot doesn't fix the problem.
> The internal debug mode doesn't give us any information, because of the 
> problem is not reproductible.
> We use the RollingFileAppender and EventLogAppender classes.
> Have you any information about this (general) issue ?
> Thank you 
> Regards

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to