Log4net
  1. Log4net
  2. LOG4NET-162

It stops writing to the log file after certain threads are terminated and recreated.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.2.10
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      C#, .net framework 3.0, VS2005, Windows XP, intel pentium 4, 3 GHz, 1 GB RAM

      Description

      We are using log4net in an windows service application, which spans number of threads. Logging works perfect until we try to refresh the cache where we terminate the threads and recreate it and in between the logging stops. When debug we see that it goes to the logger print message statement and there is no error but nothing gets written to the log file.

      This behaviour is undpredictable as sometimes it works fine when it goes through the complete refresh method.

      Settings of Log4net in app.config is as follow.

      <log4net>
      <appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
      <file value="C:\\ErrorNRTRDELogs
      NRTRDELogVPMNC.txt" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="10" />
      <maximumFileSize value="10MB" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%-5p %d %5rms %-22.22c

      {1}

      %-18.18M - %m%n" />
      </layout>
      </appender>
      <logger name="ErrorLog">
      <level value="DEBUG"/>
      <appender-ref ref="ErrorAppender"/>
      </logger>
      </log4net>

        Activity

        Amjad Khoja created issue -
        Ron Grabowski made changes -
        Field Original Value New Value
        Priority Blocker [ 1 ] Critical [ 2 ]
        Stefan Bodewig made changes -
        Fix Version/s 1.2 Maintenance Release [ 12317606 ]
        Dominik Psenner made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2 Maintenance Release [ 12317606 ]
        Resolution Cannot Reproduce [ 5 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Amjad Khoja
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 10m
              10m
              Remaining:
              Remaining Estimate - 10m
              10m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development