I don't believe it is a misconfiguration because it is a production
app that has been logging successfully (and even logged a few messages
after this particular exception) and there haven't been any
configuration changes to log4net recently.
The app stopped responding to requests at about the same time this
exception occurred.
<appender name="RollingFileAppender"
type="log4net.Appender.RollingFileAppender">
<file value="d:\\appdirectory\\log\\ErrorLog\\WebErrors.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="5" />
<maximumFileSize value="10240KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread]
%-5level %logger
[%property{NDC}] - %message%newline" />
</layout>
</appender>
<appender name="EventLogAppender"
type="log4net.Appender.EventLogAppender" >
<LogName value="ePaperlessFile" />
<ApplicationName value="ePaperlessFile Web" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date
[%thread] %-5level %logger
[%property{NDC}] - %message%newline" />
</layout>
<threshold value="INFO" />
</appender>
On 11/7/06, Ron Grabowski <[EMAIL PROTECTED]> wrote:
It looks like you managed to create an Appender with a null Name property set.
How are you configuring log4net? Can you post the appender nodes of your config
file to the list?
Did you find anything useful in log4net's debug log?
I suspect log4net is trying to tell you something:
"Failed to append to appender [" + appender.Name + "]"
but its getting a NullReferenceException instead.
----- Original Message ----
From: Kevin Krueger <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, November 7, 2006 5:28:25 PM
Subject: NullReferenceException in AppenderSkeleton.get_Name()
I had an ASP.NET 1.1 application crash recently. There was an
unhandled exception in AppenderSkeleton.get_Name(). I don't think this
is the cause of the application failure but I am hoping it might help
me determine the root cause of the problem.
What could cause this exception in this method?
System.NullReferenceException: Object reference not set to an instance
of an object.
at log4net.Appender.AppenderSkeleton.get_Name()
at log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(LoggingEvent
loggingEvent)
at log4net.Repository.Hierarchy.Logger.CallAppenders(LoggingEvent
loggingEvent)
at log4net.Repository.Hierarchy.Logger.ForcedLog(Type
callerStackBoundaryDeclaringType, Level level, Object message,
Exception exception)
at log4net.Repository.Hierarchy.Logger.Log(Type
callerStackBoundaryDeclaringType, Level level, Object message,
Exception exception)
at log4net.Core.LogImpl.Error(Object message, Exception exception)
Thanks
Kevin