Log4net
  1. Log4net
  2. LOG4NET-220

multiple users overwrite existing log file when RollingFileAppender is rolling over date and minimal locking is used

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.10
    • Fix Version/s: 1.2.12
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      .net client side application running on framework 3.5 service pack 1, windows xp box makes use of log4net dll to write user info to log files

      Description

      config settings for rolling file appender

      <?xml version="1.0" encoding="utf-8" ?>
      <log4net debug="false">
      <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender,log4net">
      <param name="File" value="C:\\Projects\\DealerMailer\\DealerMailer.UI\\DealerMailer.UI\\Log
      DealerMailer.UI_" />
      <param name="RollingStyle" value="Date" />
      <param name="DatePattern" value="ddMMyyyy.lo\g" />
      <param name="StaticLogFileName" value="false" />
      <param name="AppendToFile" value="true" />
      <encoding value="utf-8" />
      <param name="ImmediateFlush" value="true" />
      <param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
      <layout type="log4net.Layout.PatternLayout,log4net">
      <param name="ConversionPattern" value="%d [%-5level] [%logger] - %m%n" />
      </layout>
      </appender>

      <logger name="DealerMailerUI">
      <priority value="ALL" />
      <appender-ref ref="RollingFileAppender" />
      </logger>

      </log4net>

      problem
      today 070702009
      user1 logs into application today --> logs data in log file dated today (DealerMailer.UI_07072009.log)
      user2 logs into application today --> logs data in log file dated today (DealerMailer.UI_07072009.log)
      user2 logs out of application today --> logs data in log file dated today (DealerMailer.UI_07072009.log)

      tomorrow 08072009
      user1 still has his application open from yesterday (all calls are per call basis so no locks are held)
      user2 logs into application --> no file exists, rolls over to next day & logs data (DealerMailer.UI_08072009.log)
      user1 submits a transaction --> all data in (DealerMailer.UI_08072009.log) is overwritten

      i have no idea why this is happening

        Issue Links

          Activity

          shabhana rampersadh created issue -
          Stefan Bodewig made changes -
          Field Original Value New Value
          Fix Version/s 1.2 Maintenance Release [ 12317606 ]
          Stefan Bodewig made changes -
          Summary multiple users overwrite existing log file when RollingFileAppender is rolling over date multiple users overwrite existing log file when RollingFileAppender is rolling over date and minimal locking is used
          Roy Chastain made changes -
          Assignee Roy Chastain [ roy@sohotech.biz ]
          Hide
          Roy Chastain added a comment -

          Can the orignial reporter please provide more information. Is the log on the client system? Is the log from a Web Application? Any other information?

          Show
          Roy Chastain added a comment - Can the orignial reporter please provide more information. Is the log on the client system? Is the log from a Web Application? Any other information?
          Roy Chastain made changes -
          Assignee Roy Chastain [ roy@sohotech.biz ]
          Dominik Psenner made changes -
          Link This issue is superceded by LOG4NET-367 [ LOG4NET-367 ]
          Hide
          Dominik Psenner added a comment -

          Do not use minimal locking, it does not solve cross-process concurrency problems. Use interprocess locking or work around the issue in another way.

          Show
          Dominik Psenner added a comment - Do not use minimal locking, it does not solve cross-process concurrency problems. Use interprocess locking or work around the issue in another way.
          Dominik Psenner made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Dominik Psenner [ nachbarslumpi ]
          Fix Version/s 1.2.12 [ 12318546 ]
          Fix Version/s 1.2 Maintenance Release [ 12317606 ]
          Resolution Won't Fix [ 2 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          1429d 1h 30m 1 Dominik Psenner 05/Jun/13 14:25

            People

            • Assignee:
              Dominik Psenner
              Reporter:
              shabhana rampersadh
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development