[
https://issues.apache.org/jira/browse/LOG4NET-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13504804#comment-13504804
]
Matthew Schneider commented on LOG4NET-178:
-------------------------------------------
Dominik:
1] This definitely happens in IIS 6.0 as well as 7.5, I can't speak to 8.0.
2] This is likely true, it probably has something to do with the fact that IIS
runs a (shadow?) copy of the deployed code, not the code itself. Thus it might
be starting a new instance (copy) while a previous instance (different copy) is
terminating.
3] I've not had any luck with Ilpo's approach, but perhaps with another
attempt, I might... (I just don't have the time at the moment).
4] I don't know that I agree that this is not solvable in log4net itself. I
might agree that it is cheaper or easier to work around the issue (and that
might be the best thing to do), but I suspect there is a way to cope with this
if the right domain expert were to understand the problem correctly. It seems
like this is a valid bug, just with a workaround instead of a fix.
> Log4Net stops logging after appdomain recycle of ASP.NET2.0 application
> -----------------------------------------------------------------------
>
> Key: LOG4NET-178
> URL: https://issues.apache.org/jira/browse/LOG4NET-178
> Project: Log4net
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 1.2.10
> Environment: Windows server 2003
> Reporter: Richard Nijkamp
> Assignee: Dominik Psenner
> Fix For: 1.2 Maintenance Release
>
>
> Dear sir/madam,
> We are using Log4Net 1.2.10. We encounter the problem that Log4net doesn't
> continue logging after an event that triggers an appdomain recycle/restart.
> In the global.asax we start the logging with:
> private static readonly ILog log =
> LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
> Logging works flawless when the application is started for the first time.
> After sometime it might occur that the appdomain gets recycled due to
> inactivity of the web application. We use the following code in
> Application_end():
> log.Info("*** Application end ***");
> log4net.LogManager.Shutdown();
> After this function the application gets restarted and the
> Application_start() method executes and writes new lines to the log. The
> problem is that the log4net doesn't write the new lines after the restart.
> Could you explain why log4net might stop working after an appdomain restart
> of an asp.net2.0 web application? If I want log4net to work properly again I
> need to restart IIS manually.
> Looking forward to your reply.
> Best regards,
> Richard Nijkamp
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira