You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by ChrisFromStPete <cw...@hotmail.com> on 2012/06/21 22:41:37 UTC

fileAppender.ActivateOptions generates NullReferenceException

So I'm calling fileAppender.ActivateOptions to change the log file name & it
occasional generates a NullReferenceException, but the catch is that it only
does it occasionally.  It usually works.  

The posts I've all read involve issues that would lead
fileAppender.ActivateOptions to fail all the time, not just at seemingly
random moments.  Any thoughts on this?

Thanks




-- 
View this message in context: http://old.nabble.com/fileAppender.ActivateOptions-generates-NullReferenceException-tp34051054p34051054.html
Sent from the Log4net - Users mailing list archive at Nabble.com.


Re: fileAppender.ActivateOptions generates NullReferenceException

Posted by ChrisFromStPete <cw...@hotmail.com>.
ok, stupid question.  How do I generate a stack trace that includes log4net
classes?  This problem mostly happens in our prod environment, but I finally
captured it happening on a test server. The stack trace, however, only has
the following, It doesn't go into log4net libraries at all.

log4net.Appender.RollingFileAppender.ActivateOptions() 



ChrisFromStPete wrote:
> 
> So I'm calling fileAppender.ActivateOptions to change the log file name &
> it occasional generates a NullReferenceException, but the catch is that it
> only does it occasionally.  It usually works.  
> 
> The posts I've all read involve issues that would lead
> fileAppender.ActivateOptions to fail all the time, not just at seemingly
> random moments.  Any thoughts on this?
> 
> Thanks
> 
> 
> 
> 
> 
-- 
View this message in context: http://old.nabble.com/fileAppender.ActivateOptions-generates-NullReferenceException-tp34051054p34074730.html
Sent from the Log4net - Users mailing list archive at Nabble.com.


RE: fileAppender.ActivateOptions generates NullReferenceException

Posted by Dominik Psenner <dp...@gmail.com>.
>So I'm calling fileAppender.ActivateOptions to change the log file name &
>it
>occasional generates a NullReferenceException, but the catch is that it
>only
>does it occasionally.  It usually works.
>
>The posts I've all read involve issues that would lead
>fileAppender.ActivateOptions to fail all the time, not just at seemingly
>random moments.  Any thoughts on this?

Hi Chris,

can you provide us a stacktrace to pinpoint the problem?

Cheers,
D.