Return-Path: X-Original-To: apmail-logging-log4net-user-archive@www.apache.org Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9745B9ABC for ; Thu, 13 Oct 2011 05:32:20 +0000 (UTC) Received: (qmail 52678 invoked by uid 500); 13 Oct 2011 05:32:20 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 52633 invoked by uid 500); 13 Oct 2011 05:32:20 -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 52607 invoked by uid 99); 13 Oct 2011 05:32:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2011 05:32:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.112.162.197] (HELO mail.hasam.cz) (217.112.162.197) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2011 05:32:10 +0000 Received: from CENTRALDC.hasam.cz ([::1]) by CENTRALDC.hasam.cz ([::1]) with mapi id 14.01.0339.001; Thu, 13 Oct 2011 07:31:50 +0200 From: Radovan Raszka To: 'Log4NET User' Subject: RE: How to prevent creating log file ??? Thread-Topic: How to prevent creating log file ??? Thread-Index: AQHMiN+LmEcCfrGS30mBDurc2TJ895V5spANgAAN3yA= Date: Thu, 13 Oct 2011 05:31:48 +0000 Message-ID: <65A953606BE72348B0E8218309D489A109D7AF10@CENTRALDC.hasam.cz> References: <32638170.post@talk.nabble.com> <8739eyb88c.fsf@v35516.1blu.de> <32639452.post@talk.nabble.com> <87pqi1cxot.fsf@v35516.1blu.de> In-Reply-To: <87pqi1cxot.fsf@v35516.1blu.de> Accept-Language: cs-CZ, en-US Content-Language: cs-CZ X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.0.206] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Well, it is :) but some programming is needed See this post http://mail-archives.apache.org/mod_mbox/logging-log4net-user= /200708.mbox/%3C2DE096D91923074A82B1E17ADC480EC80135926F@nasa-dtw-ex004.nas= a.cpwr.corp%3E Radovan -----P=F9vodn=ED zpr=E1va----- Od: Stefan Bodewig [mailto:bodewig@apache.org]=20 Odesl=E1no: 13. =F8=EDjna 2011 6:39 Komu: Log4NET User P=F8edm=ECt: Re: How to prevent creating log file ??? On 2011-10-12, Sigourney_Weaver wrote: > Hi Stefan, > Thank you, but it didnt work :( > For the second appender I specified: type=3D"log4net.Appender.FileAppender+MinimalLock" /> > http://old.nabble.com/file/p32639452/20111012115258.png > but it still creates the empty log file (and I dont log any FATAL errors)= . Yes, my fault. I overlooked that FileAppender.OpenFile acquires the lock before calling SetQWForFiles (not sure it needs a lock there, will investigate) and once again in order to write the header. So no, there is no way with the current FileAppender to avoid the empty files. Stefan