Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-178

Log4Net stops logging after appdomain recycle of ASP.NET2.0 application

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 1.2.10
    • 1.2.12
    • Appenders
    • None
    • Windows server 2003

    Description

      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

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nachbarslumpi Dominik Psenner
            rnijkamp Richard Nijkamp
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment