Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 18553 invoked from network); 31 Jul 2009 15:06:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Jul 2009 15:06:19 -0000 Received: (qmail 82404 invoked by uid 500); 31 Jul 2009 15:06:19 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 82361 invoked by uid 500); 31 Jul 2009 15:06:19 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 82352 invoked by uid 99); 31 Jul 2009 15:06:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jul 2009 15:06:19 +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 karym6@hotmail.com designates 65.55.111.166 as permitted sender) Received: from [65.55.111.166] (HELO blu0-omc4-s27.blu0.hotmail.com) (65.55.111.166) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jul 2009 15:06:09 +0000 Received: from BLU127-W25 ([65.55.111.135]) by blu0-omc4-s27.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 31 Jul 2009 08:05:48 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_a8912642-e6db-4784-9502-e47f91588a24_" X-Originating-IP: [194.9.188.21] From: Karim Bourouba To: Subject: RE: Defer file creation Date: Fri, 31 Jul 2009 16:05:48 +0100 Importance: Normal In-Reply-To: <000301ca11e9$5b9d5450$12d7fcf0$@com> References: <000301ca11e9$5b9d5450$12d7fcf0$@com> MIME-Version: 1.0 X-OriginalArrivalTime: 31 Jul 2009 15:05:48.0895 (UTC) FILETIME=[6347BEF0:01CA11F0] X-Virus-Checked: Checked by ClamAV on apache.org --_a8912642-e6db-4784-9502-e47f91588a24_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi There=2C =20 I dont think I have an answer to your question just now - but can I ask why= you would prefer to defer creating the log file? =20 From: wolfgang@wollinet.com To: log4net-user@logging.apache.org Subject: Defer file creation Date: Fri=2C 31 Jul 2009 16:15:28 +0200 Hi Everbody=2C =20 I=92m looking for a way to defer the creation of the log file until the fir= st entry is logged. I want to use log4net for writing protocols for jobs th= at can be executed in my application. With my current configuration the fil= e is created during startup which makes no sense if the job doesn=92t run. = =20 =20 My current configuration: =20 =20 One possibility seems to be to generate the appender programmatically=2C bu= t then I lose a lot of flexibility. Another one is writing my own appender = (or subclassing an existing one). Is there another way ? =20 Any help is appreciated=2C Wolfgang =20 _________________________________________________________________ Share your memories online with anyone you want. http://clk.atdmt.com/UKM/go/134665338/direct/01/= --_a8912642-e6db-4784-9502-e47f91588a24_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Hi There=2C

 =3B

I dont think I have an answer to your question just now - but can I ask = why you would prefer to defer creating the log file?



 = =3B


From: wolfgang@wollinet.com
To: log4net-user@logging.apache.org
Subje= ct: Defer file creation
Date: Fri=2C 31 Jul 2009 16:15:28 +0200

Hi Everbody=2C

 =3B

I=92m looking for a way to defer= the creation of the log file until the first entry is logged. I want to us= e log4net for writing protocols for jobs that can be executed in my applica= tion. With my current configuration the file is created during startup whic= h makes no sense if the job doesn=92t run. =3B

 =3B

My current configuration:=

 =3B

 =3B =3B =3B =3B = =3B <=3Bappender name=3D"= =85" t= ype=3D"&= gt=3B

 =3B =3B =3B =3B = =3B =3B =3B <=3Bfile= value=3D"....." />=3B

 =3B =3B =3B =3B = =3B =3B =3B <=3BappendToFile value=3D"false" />=3B<= /SPAN>

 =3B =3B =3B =3B = =3B =3B =3B <=3BrollingStyle value=3D"Date" />=3B

 =3B =3B =3B =3B = =3B =3B =3B <=3BdatePattern value=3D"yyyy_MM_dd.\tx\t" />= =3B

 =3B =3B =3B =3B = =3B =3B =3B <=3BstaticLogFileName<= SPAN lang=3DEN-US style=3D"FONT-SIZE: 9pt=3B COLOR: blue=3B FONT-FAMILY: 'C= ourier New'"> value=3D"false" />=3B

 =3B =3B =3B =3B = =3B =3B =3B <=3Bthreshold value=3D"INFO" />=3B

 =3B =3B =3B =3B = =3B =3B =3B <=3Blayout type=3D"log4net.Layout.PatternLayout" =3B =3B =3B =3B = =3B =3B =3B =3B =3B <=3Bconvers= ionPattern value=3D"%date=3B%level=3B%m%n" />=3B

 =3B =3B =3B =3B = =3B =3B =3B <=3B/layout>=3B

 =3B =3B =3B =3B =3B <=3B/appender>=3B

 =3B

One possibility seems to be to g= enerate the appender programmatically=2C but then I lose a lot of flexibili= ty. Another one is writing my own appender (or subclassing an existing one)= . Is there another way ?

 =3B

Any help is appreciated=2C

Wolfgang

 =3B


<= hr />Share your memories online with anyone you want. Learn more. = --_a8912642-e6db-4784-9502-e47f91588a24_--