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 0A4DF18641 for ; Wed, 2 Dec 2015 13:08:12 +0000 (UTC) Received: (qmail 17754 invoked by uid 500); 2 Dec 2015 13:08:11 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 17515 invoked by uid 500); 2 Dec 2015 13:08:11 -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 17271 invoked by uid 99); 2 Dec 2015 13:08:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2015 13:08:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 75C802C1F74 for ; Wed, 2 Dec 2015 13:08:11 +0000 (UTC) Date: Wed, 2 Dec 2015 13:08:11 +0000 (UTC) From: "Robert Schaft (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-435) Feature request: auto-delete older log files 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-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15035760#comment-15035760 ] Robert Schaft commented on LOG4J2-435: -------------------------------------- Ah, I forgot to mention the {{}} vs {{}} strangeness: The cause of this is probably, that we are expecting a logical condition in the {{}} element (In java speak: a boolean expression). But we are actually providing a void expression with the side effect that it sometimes triggers a delete. > Feature request: auto-delete older log files > --------------------------------------------- > > Key: LOG4J2-435 > URL: https://issues.apache.org/jira/browse/LOG4J2-435 > Project: Log4j 2 > Issue Type: Improvement > Reporter: Arkin Yetis > Assignee: Remko Popma > Labels: Rollover > Fix For: 2.5 > > Attachments: LimitingRolloverStrategy.java, SizeParser.java > > > Original description: > {quote} > DefaultRolloverStrategy max attribute only applies if you have a %i in the file pattern. This request is to enhance DefaultRolloverStrategy or another appropriate component to allow a max number of files limit to apply across days/months/years when a filePattern includes a date pattern. > {quote} > ---- > One of the most requested features is to add the ability to Log4j to "clean up" older log files. This usually means deleting these files, although it could also mean moving them to a different location, or some combination of these. > Users have different requirements for selecting the files to clean up. A common request is the ability to keep the last X number of log files. This works well if rollover is only date based but may give undesired results with size based rollover. > Another factor to consider is that the directory containing the log files may contain the log files for multiple appenders, or even files unrelated to logging. -- 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