Just to be sure, use an InterProcessLock in your configuration and check if this happens again. You might also want to include process information in the log messages.
Von: Tim Sirmovics [mailto:[email protected]] Gesendet: Dienstag, 27. Mai 2014 02:49 An: [email protected] Betreff: FW: RollingFileAppender overwriting file I have been using the RollingFileAppender through numerous log4net version for about 3-4 years. In the last few days I am now experiencing the following issue: 1. Assume today is 27/05/2014 2. Current log file is called Debug.log 3. Log file builds up throughout the day. 4. Next day (28/05/2014), log file Debug.log.27.log exists, last write time according to windows is 27/05/2014 11:59 pm 5. Open log file, all entries from 27/05 are gone, log only contains a very small number of entries dated 28/05/2014 just after midnight. I am now losing my logs for each day as they are being overwritten by the first few logs after midnight. Only one process writes to this file. The process is limited to only running a single instance at a time. I have not changed my configuration for a long time, however I have included it below. <!-- Last month, one file per day --> <appender name="DebugRollingFileAppender" type="log4net.Appender.RollingFileAppender"> <file value="Logs\Debug.log" /> <appendToFile value="true" /> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> <rollingStyle value="Date" /> <datePattern value=".dd'.log'" /> <maxSizeRollBackups value="14" /> <threshold value="DEBUG"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="|%date| |%-5level| |%property{log4net:HostName}| |%logger{2}|: %message%newline" /> </layout> </appender> Is there any way I can prevent this from happening? Tim Sirmovics IT [email protected] <mailto:[email protected]> AXIMA Pty. Ltd. 135 Boundary Road, Laverton North Victoria 3026 Australia T: +61 3 83685300 F: +61 3 83685333 W: www.axima.com.au <http://www.axima.com.au> This message and any files transmitted with it are confidential and are intended solely for the use of those persons to whom the message is addressed. If you have received this message in error, please destroy and delete this message from your computer. Any unauthorised reproduction of this message or any files transmitted with it is strictly prohibited. All business is conducted pursuant to Axima's trading terms and conditions which may exclude or limit liability in certain circumstances.
