Dominik, you were right. Setting IsBackground=true did solve the problem. Thank you very much for your assistance and such a great library!
2013/1/9 Dominik Psenner <dpsen...@gmail.com> > In this case I would argument that you have a worker thread that you > don’t properly terminate by exiting from the worker thread loop with a > break or return or you have forgot to set IsBackground=true on the worker > thread such that it can be terminated by the process automatically.**** > > ** ** > ------------------------------ > > *From:* lunaticare [mailto:lunatic...@gmail.com] > *Sent:* Wednesday, January 09, 2013 1:36 PM > *To:* Log4NET User > *Subject:* Re: log4net:ERROR Failed to append to appender > [EventLogAppender]**** > > ** ** > > Hello Dominik,**** > > you're right, this happens when application closes.**** > > ** ** > > 2013/1/9 Dominik Psenner <dpsen...@gmail.com>**** > > 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:lunatic...@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**** > > **** > > ** ** >