Return-Path: Delivered-To: apmail-logging-log4net-dev-archive@www.apache.org Received: (qmail 39053 invoked from network); 18 Nov 2005 11:37:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Nov 2005 11:37:39 -0000 Received: (qmail 73847 invoked by uid 500); 18 Nov 2005 11:37:31 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 73685 invoked by uid 500); 18 Nov 2005 11:37:29 -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 73653 invoked by uid 99); 18 Nov 2005 11:37:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2005 03:37:28 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of nicko@neoworks.com designates 80.168.17.114 as permitted sender) Received: from [80.168.17.114] (HELO hermes.neoworks.co.uk) (80.168.17.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2005 03:39:00 -0800 Received: from kronos.neoworks.co.uk (kronos.neoworks.co.uk [10.0.0.132]) by hermes.neoworks.co.uk (8.13.1/8.13.1) with ESMTP id jAIBWHNQ003237 for ; Fri, 18 Nov 2005 11:32:19 GMT Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable x-mimeole: Produced By Microsoft Exchange V6.5.6944.0 Subject: RE: Question about RollingFileAppender output ending in a txt extension? Date: Fri, 18 Nov 2005 11:37:01 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Question about RollingFileAppender output ending in a txt extension? Thread-Index: AcXp/OVIJ6R5v8PdSaG3ndbpxRkP3wCM0Gsw From: "Nicko Cadell" To: "Log4NET Dev" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The RollingFileAppender does not currently support patterns for the numeric file extensions. The rolled file number must be the last part of the filename for the appender to identify it. If anyone wants to try to implement this enhancement I think it should be relatively straight forward. The Int32.ToString supports patterns, for example: 7.ToString("000'.txt'") -> "007.txt" So it should be simple enough to add a number pattern property and then use that to expand the numeric value into the file name string when opening the file or when searching for the existing files. Cheers, Nicko > -----Original Message----- > From: Secules, Christopher T [AMSRD-AAR-AEF-A]=20 > [mailto:chris.secules@us.army.mil]=20 > Sent: 15 November 2005 15:54 > To: 'log4net-dev@logging.apache.org' > Subject: Question about RollingFileAppender output ending in=20 > a txt extension? >=20 > I've tried playing around with my config file wrt log file=20 > names, and I can't seem to get what I'm looking for. I am=20 > wondering if there is a way to have the output from the=20 > RollingFileAppender save all the log files as text files=20 > (.txt). I've noticed that if I specify just a date pattern=20 > in the DatePattern parameter, the resulting log files I get are named: >=20 > Server-2005-11-15 > Server-2005-11-15.1 > Server-2005-11-15.2 > Server-2005-11-15.3 > Server-2005-11-15.4 > Server-2005-11-15.5 > And so on...=20 >=20 > I'm looking for something like:=20 >=20 > Server-2005-11-15.txt > Server-2005-11-15.1.txt > Server-2005-11-15.2.txt > Server-2005-11-15.3.txt > Server-2005-11-15.4.txt > Server-2005-11-15.5.txt > And so on...so that the default program to open it is=20 > something like Notepad, and not "Unknown Application"=20 >=20 > Does anyone know of any way to do this, preferrably without=20 > extending the source code and just using the pre-packaged log4net.dll? >=20 > Thanks a lot!=20 > Chris=20 >=20 >=20