[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4net-user
Subject:    Problems with NUnit and log4net
From:       "Chris Smith" <chris.smith () intelliflo ! com>
Date:       2008-09-16 9:05:04
Message-ID: 3E108A5FCC3FF14787A218330980E0B9063C6CC0 () THEXCHBE2X ! services ! byworkwise ! com
[Download RAW message or body]

Hi,

We are using log4net in conjunction with NUnit and MSBuild.

We are testing a cache implementation which requires the usage of
log4net and Common Logging (from the Spring Framework).  

When running unit tests, each invocation of a test case which causes a
log entry to be created in turn causes log4net to blow up on the trace
with the following:

log4net:ERROR [TraceAppender] Failed in DoAppend
System.Threading.ThreadAbortException: Thread was being aborted.
   at
System.Diagnostics.StackTrace.GetStackFramesInternal(StackFrameHelper
sfh, Int32 iSkip, Exception e)
   at System.Diagnostics.StackTrace.CaptureStackTrace(Int32 iSkip,
Boolean fNeedFileInfo, Thread targetThread, Exception e)
   at log4net.Core.LocationInfo..ctor(Type
callerStackBoundaryDeclaringType)
   at log4net.Core.LoggingEvent.get_LocationInformation()
   at
log4net.Layout.Pattern.MethodLocationPatternConverter.Convert(TextWriter
writer, LoggingEvent loggingEvent)
   at log4net.Layout.Pattern.PatternLayoutConverter.Convert(TextWriter
writer, Object state)
   at log4net.Util.PatternConverter.Format(TextWriter writer, Object
state)
   at log4net.Layout.PatternLayout.Format(TextWriter writer,
LoggingEvent loggingEvent)
   at log4net.Appender.AppenderSkeleton.RenderLoggingEvent(TextWriter
writer, LoggingEvent loggingEvent)
   at log4net.Appender.AppenderSkeleton.RenderLoggingEvent(LoggingEvent
loggingEvent)
   at log4net.Appender.TraceAppender.Append(LoggingEvent loggingEvent)
   at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent
loggingEvent)

Can anyone explain this at all, as I don't know log4net internals at
all?  It is currently causing our build to fail as MSBuild interprets
this as a failure condition.

Many Thanks,

Chris Smith
http://www.intelliflo.com/


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic