Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 4480 invoked from network); 12 May 2009 12:13:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 May 2009 12:13:48 -0000 Received: (qmail 19093 invoked by uid 500); 12 May 2009 12:13:47 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 19013 invoked by uid 500); 12 May 2009 12:13:47 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 19002 invoked by uid 99); 12 May 2009 12:13:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 12:13:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of techbeesadigest@gmail.com designates 209.85.198.242 as permitted sender) Received: from [209.85.198.242] (HELO rv-out-0708.google.com) (209.85.198.242) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 12:13:39 +0000 Received: by rv-out-0708.google.com with SMTP id f25so2538117rvb.10 for ; Tue, 12 May 2009 05:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Rfxwy5aNltDBlBZ48TdFkb0iGLMAv/jHhKIkDG9ppGM=; b=S3I2XhOeWU7DNZT6KZeJ80hI0qZGJPigJulswNr4e08+xY2V/hWxoZrAa0ZFSXcryX rDT6VoM/Wco6EEAGWYN8M57LtEEzh/oItU9QaI8pbmUAfWj11+Ta1DrVIJ1USeaBVye/ DLVczQLXM2HUdMnlcaZcCcCTnKPIchzstbEOA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=crvyI9IOmO8GbewqD/YevTCDM4Mdmhb5cE4DmwGDqve9+3dOa1cclrFhgN/U9abfpK aoF3392el6sU9uhdm1aYHBAB5QMuK9e785yudfEbG6V25O/h0A1HRhwUGqjq5GGCBKR0 clba3aMiwnthU89zv7mxbwOigNcVZzCzYOCJM= MIME-Version: 1.0 Received: by 10.142.223.4 with SMTP id v4mr3700247wfg.11.1242130399192; Tue, 12 May 2009 05:13:19 -0700 (PDT) Date: Tue, 12 May 2009 17:43:19 +0530 Message-ID: <7914102f0905120513s32a2b5e8p24dcb104799a28cd@mail.gmail.com> Subject: Alternative naming convention for renaming files using RollingFileAppender From: sarat kumar To: log4j-user@logging.apache.org Content-Type: multipart/alternative; boundary=000e0cd2553435682a0469b60561 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd2553435682a0469b60561 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all, I have a question on the renaming strategy followed in the RollingFileAppender in log4j. The current logic works by rolling over the current file by appending the index count at the end. I was wondering if there's a custom appender available which can allow me to customize the renaming strategy followed while rolling over to a new file. Basically, the requirement I have is that.. I need to rollover to new log file if it reaches a threshold size and when I rollover, the old file should be renamed with a timestamp in it. After going through the documentation I figured out the daily appender does the job I want by adding timestamp at the end of the file name, but it can't rollover the file based on its size. I also searched in couple of forums that I know and found no fruitful results. Finally, I have checked the source code and figured out the 'rollover' method typically hard codes logic to rollover the current file with appending the index information to it. So, i guess my option is only to look for third party appenders which can provide this functionality. Can anyone point me to the right direction here ? if you know any third party log4j appenders which can address this issue, it'd be of great help for me. Thanks in advance for your replies. Regards, Sarat kumar Beesa. --000e0cd2553435682a0469b60561--