Return-Path: X-Original-To: apmail-logging-log4net-dev-archive@www.apache.org Delivered-To: apmail-logging-log4net-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2B6BE779 for ; Mon, 27 May 2013 11:33:16 +0000 (UTC) Received: (qmail 18226 invoked by uid 500); 27 May 2013 11:31:13 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 13432 invoked by uid 500); 27 May 2013 11:30:13 -0000 Mailing-List: contact log4net-dev-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET Dev" List-Id: Delivered-To: mailing list log4net-dev@logging.apache.org Received: (qmail 9184 invoked by uid 99); 27 May 2013 10:22:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 May 2013 10:22:20 +0000 Date: Mon, 27 May 2013 10:22:20 +0000 (UTC) From: "Horst Beham (JIRA)" To: log4net-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (LOG4NET-378) Rolling log file is overwritten when application is restarted MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4NET-378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13667678#comment-13667678 ] Horst Beham edited comment on LOG4NET-378 at 5/27/13 10:20 AM: --------------------------------------------------------------- Data is definitively lost. File "flotto.20130527.1.log" had 4MB of log data in it (which was then rolled over to flotto.20140527.2.log) and when the process was restarted file 1.log got truncated and is currently being written to. I can see original log statements and timestamps in 0.log, 2.log, 3.log. The original information from 1.log is missing and the file only contains log statements since the process restarted. When I restart the process again, file 1.log is being truncated again even though it's currently only 100KB in size. The intention of my composite rolling appender is to roll the file when the date changes or when the current file is already larger than 4MB. I'll download the sources now and try to find the problematic code was (Author: hbeham): Data is definitively lost. File "flotto.20130527.1.log" had 4MB of log data in it (which was then rolled over to flotto.20140527.2.log) and when the process was restarted file 1.log got truncated and is currently being written to. I can see original log statements and timestamps in 0.log, 2.log, 3.log. The original information from 1.log is missing and the file only contains log statements since the process restarted. When I restart the process again, file 1.log is being truncated again even though it's currently only 100KB in size. > Rolling log file is overwritten when application is restarted > ------------------------------------------------------------- > > Key: LOG4NET-378 > URL: https://issues.apache.org/jira/browse/LOG4NET-378 > Project: Log4net > Issue Type: Bug > Affects Versions: 1.2.11 > Reporter: Horst Beham > Priority: Minor > > My server process uses log files which roll on date and file size (4MB). > When I restart the server and there are already more than 1 log files for the current date, the 2nd segment gets overwritten and the 3rd, 4th, ... may get overwritten later, when #2 is filled up again. > I'm using version 1.2.11, which I can't select in the "Affects Version" combo box. > e.g. > flotto.20130527.0.log = 4MB > flotto.20130527.1.log = 0MB (just got overwritten when the server was restarted) > flotto.20130527.2.log = 4MB (still contains original data but will be overwritten too as soon as #1 fills up) > flotto.20130527.3.log = 4MB (same as above) > The configuration in MyServer.exe.config looks like this: > > > > > utf-8 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- 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