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 5D01911BD1 for ; Wed, 20 Aug 2014 08:54:27 +0000 (UTC) Received: (qmail 65311 invoked by uid 500); 20 Aug 2014 08:54:26 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 65045 invoked by uid 500); 20 Aug 2014 08:54:26 -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 64887 invoked by uid 99); 20 Aug 2014 08:54:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2014 08:54:26 +0000 Date: Wed, 20 Aug 2014 08:54:26 +0000 (UTC) From: "Krzysztof L. (JIRA)" To: log4net-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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=14103641#comment-14103641 ] Krzysztof L. commented on LOG4NET-378: -------------------------------------- Hello Patch provided in commit (http://svn.apache.org/repos/asf/logging/log4net/trunk): {quote} Revision: 1486596 Author: dpsenner Date: 27.05.2013 14:45:46 Message: LOG4NET-378 fixed a problem where rolled log files get overwritten when the application is restarted The cause is that InitializeFromOneFile() does not succesfully detect the filenames. ---- Modified : /logging/log4net/trunk/src/Appender/RollingFileAppender.cs {quote} works OK for configuration provided in "Description" of this ticket. But it does NOT WORK in scenario when datePattern has additional *uppercase* characters, eg: bq. I know that additional strings could be inserted to utf-8 {quote} This configuration "creates" log files with the following names: {quote} Log4NetTester_2014-08-29.2.log Log4NetTester_2014-08-29.1.log Log4NetTester_2014-08-29.0.log {quote} Same effect could be probably achieved by this: {quote} utf-8 {quote} but problem will occur when someone will use uppercase characters in file extension ()... > 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 > Components: Appenders > Affects Versions: 1.2.11 > Reporter: Horst Beham > Assignee: Dominik Psenner > Priority: Critical > Fix For: 1.2.12 > > > 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 was sent by Atlassian JIRA (v6.2#6252)