Return-Path: Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: (qmail 60299 invoked from network); 27 May 2010 17:55:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 May 2010 17:55:11 -0000 Received: (qmail 72804 invoked by uid 500); 27 May 2010 17:55:11 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 72772 invoked by uid 500); 27 May 2010 17:55: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 72764 invoked by uid 99); 27 May 2010 17:55:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 May 2010 17:55:11 +0000 X-ASF-Spam-Status: No, hits=-1.8 required=10.0 tests=AWL,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [157.181.1.138] (HELO mx3.mail.elte.hu) (157.181.1.138) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 May 2010 17:55:03 +0000 Received: from login01.caesar.elte.hu ([157.181.151.130]) by mx3.mail.elte.hu with esmtp (Exim) id 1OHhHt-0008CM-T2 from for ; Thu, 27 May 2010 19:54:41 +0200 Received: from lacos by login01.caesar.elte.hu with local (Exim) id 1OHhHt-0004iS-MV from for ; Thu, 27 May 2010 19:54:33 +0200 Date: Thu, 27 May 2010 19:54:33 +0200 (CEST) From: "Ersek, Laszlo" To: log4j-dev@logging.apache.org Subject: docs bug? "rolling.RollingFileAppender" has no "MaxBackupIndex" Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-ELTE-SpamScore: 1.0 X-ELTE-SpamLevel: s X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=1.0 required=5.9 tests=BAYES_50 autolearn=no SpamAssassin version=3.2.5 1.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] Hi, I'm trying to create a log4j config where rotation is triggered by file size, an rotation includes compression. Browsing the docs and the config DTD, my purpose seems achievable with rolling.RollingFileAppender + SizeBasedTriggeringPolicy + TimeBasedRollingPolicy. (The latter is only needed because it seems to be the only rolling policy that supports compression out of the box.) Hence I created a config file for the DOM configurator. In fact, I'm converting an older config file which was written for the property configurator. The old configuration used the original (not extras) RollingFileAppender. I'm having trouble converting the MaxBackupIndex property of that older class. Any MaxBackupIndex seem to make no sense for the new rolling.RollingFileAppender, since that one requires an explicit rolling policy. My problem is that the API docs do talk about MaxBackupIndex, in the description of rollover(): http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html I downloaded apache-log4j-extras-1.0.tar.gz and tried to look at the code (src/main/java/org/apache/log4j/rolling/RollingFileAppender.java). It appears to me that the class has indeed no business with any MaxBackupIndex -- the only mentions are in the leading comment of rollover() (which is probably the source of the javadoc occurrences too). I checked the bugzilla with "Product: Log4j, Summary: maxbackupindex", and it only returned #24407, which is irrelevant here ("large maxbackupindex makes RollingFileAppender dread slow"). So is this a documentation bug? ... Furthermore, now that I'm looking at the source of FixedWindowRollingPolicy, it does seem to support gzip compression. Its description doesn't mention it though (while that of its sibling class TimeBasedRollingPolicy does): http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/FixedWindowRollingPolicy.html so I think people are led to believe that only TimeBasedRollingPolicy supports compression. Is this another documentation bug? In closing, thank you very much for this great software! Cheers, lacos --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org