logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Psenner" <dpsen...@gmail.com>
Subject RE: log4net:ERROR Failed to append to appender [EventLogAppender]
Date Wed, 09 Jan 2013 12:12:16 GMT
Hi,

 

did this happen near the end of the process lifetime (i.e. when you closed
the application that uses log4net for logging)?

 

Cheers,

D.

 

  _____  

From: Dmitry Pogodin [mailto:lunaticare@gmail.com] 
Sent: Wednesday, January 09, 2013 11:38 AM
To: log4net-user@logging.apache.org
Subject: log4net:ERROR Failed to append to appender [EventLogAppender]

 

Good time of day to you!

 

I've got the following exception while using log4net:


log4net:ERROR Failed to append to appender [EventLogAppender]
System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Threading.Monitor.Enter(Object obj)
   at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent loggingEvent)
   at log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(LoggingEvent
loggi
ngEvent)
log4net:ERROR Exception while logging
System.Threading.ThreadAbortException: Thread was being aborted.
   at log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(LoggingEvent
loggi
ngEvent)
   at log4net.Repository.Hierarchy.Logger.CallAppenders(LoggingEvent
loggingEven
t)
   at log4net.Repository.Hierarchy.Logger.ForcedLog(Type
callerStackBoundaryDecl
aringType, Level level, Object message, Exception exception)
   at log4net.Repository.Hierarchy.Logger.Log(Type
callerStackBoundaryDeclaringT
ype, Level level, Object message, Exception exception)

I use the following config:



<log4net>
    <root>
      <level value="ALL"/>
      <appender-ref ref="EventLogAppender"/>
    </root>
    <appender name="EventLogAppender"
type="log4net.Appender.EventLogAppender" >
      <logName value="TestLog">
        <applicationName value="SampleApp" />
      </logName>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date %logger - %message%newline" />
      </layout>
    </appender>
  </log4net>

Ready to give more information if you need.

 

Best regards, lunaticare

 


Mime
View raw message