Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-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 2B78718A2C for ; Tue, 7 Jul 2015 12:50:07 +0000 (UTC) Received: (qmail 84106 invoked by uid 500); 7 Jul 2015 12:50:06 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 84026 invoked by uid 500); 7 Jul 2015 12:50:06 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 83942 invoked by uid 99); 7 Jul 2015 12:50:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2015 12:50:06 +0000 Date: Tue, 7 Jul 2015 12:50:06 +0000 (UTC) From: "Remko Popma (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (LOG4J2-889) RollingRandomAccessFileAppender appends the header every time the application is started. 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/LOG4J2-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma resolved LOG4J2-889. -------------------------------- Resolution: Fixed Fix Version/s: 2.4 Fixed in commit 547574f9. > RollingRandomAccessFileAppender appends the header every time the application is started. > ----------------------------------------------------------------------------------------- > > Key: LOG4J2-889 > URL: https://issues.apache.org/jira/browse/LOG4J2-889 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders > Affects Versions: 2.0.2 > Environment: Windows 8 > Reporter: Kenneth Leider > Assignee: Remko Popma > Priority: Minor > Fix For: 2.4 > > > It looks like the problem is at RollingRandomAccessFileManager.java:58. > I think there needs to be a check to see if the file is empty before appending the header > if (raf.length() == 0) writeHeader(); -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org