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

Stefan Bodewig commented on LOG4NET-330:
----------------------------------------

My first guess is your mail appender is somehow throwing exceptions early on 
(or even later) and your service does some INFO level logging when it start.

Does you service send out any mails after it has started?  I.e. does the 
appender work or does your service only start because it never uses the 
appender?

Any chance you can enable internal debugging? 
http://logging.apache.org/log4net/release/faq.html#internalDebug
                
> Service fails to start if MailAppender threshold value is INFO or lower.  
> --------------------------------------------------------------------------
>
>                 Key: LOG4NET-330
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-330
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.11
>         Environment: Windows 2008 R2 x64.  
>            Reporter: Bruce Cummins
>
> If I place the following mail appender in our service config file, and add an 
> appender reference, the service will not start.  If I set the threshold to 
> WARN or higher, the service starts.  
> Worked fine in previous versions of log4net.
> <appender name="MailAppender" type="log4net.Appender.SmtpAppender">
>               <threshold value="INFO" />
>               <to value="m...@mail.com" />
>               <from value="m...@mail.com"/>
>               <subject type="log4net.Util.PatternString" value="%date{yyyy MM 
> dd}: %appdomain at %env{COMPUTERNAME} threw an error" />
>               <smtpHost value="MailHost"/>
>               <port value="25" />
>               <authentication value="None" />
>               <layout type="log4net.Layout.PatternLayout">
>                       <conversionPattern value="%date [%thread] %-5level 
> %logger - %message%newline" />
>               </layout>
>               <bufferSize value="10"/>                
>       </appender>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to