Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 28436 invoked from network); 17 Jun 2008 15:41:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jun 2008 15:41:22 -0000 Received: (qmail 56542 invoked by uid 500); 17 Jun 2008 15:41:23 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 56514 invoked by uid 500); 17 Jun 2008 15:41:22 -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 56503 invoked by uid 99); 17 Jun 2008 15:41:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 08:41:22 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nickenobi@hotmail.com designates 65.54.246.108 as permitted sender) Received: from [65.54.246.108] (HELO bay0-omc1-s36.bay0.hotmail.com) (65.54.246.108) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 15:40:30 +0000 Received: from BAY106-W41 ([65.54.161.141]) by bay0-omc1-s36.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Jun 2008 08:40:27 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_b2590187-6873-4cda-a7b2-472a5e576f2a_" X-Originating-IP: [212.180.5.197] From: Nicolas Chollet To: Subject: Retry to lock log files Date: Tue, 17 Jun 2008 17:40:26 +0200 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 17 Jun 2008 15:40:27.0630 (UTC) FILETIME=[7759C8E0:01C8D090] X-Virus-Checked: Checked by ClamAV on apache.org --_b2590187-6873-4cda-a7b2-472a5e576f2a_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello,I am using log4Net for my application.Everything is fine, except dur= ing the night where my server restart the IIS Worker process.And sometimes,= the day after I don=3D92t have log!!A guy from Microsoft told me that duri= ng the IIS operation on the Worker Process, the old process (which locks th= e log file) is killed after the creation of the new process.So the new proc= ess doesn=3D92t have the lock on my log file.At the beginning of my applica= tion, I do : log4net.Config.DOMConfigurator.Configure()pLog =3D3D log4net.LogManager.Get= Logger("MyFunction")How can I test if the file is locked? So I will be able= to develop a retry function after 30 seconds.Thank you,PS : sorry for my E= nglish I am not very good in languages...Nicolas _________________________________________________________________ Retouchez, classez et partagez vos photos gratuitement avec le logiciel Gal= erie de Photos ! http://www.windowslive.fr/galerie/= --_b2590187-6873-4cda-a7b2-472a5e576f2a_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable  
Hello,

I am using log4Net for my application.
Everythin= g is fine, except during the night where my server restart the IIS Worker p= rocess.

And sometimes, the day after I don=3D92t have log!!

A= guy from Microsoft told me that during the IIS operation on the Worker Pro= cess, the old process (which locks the log file) is killed after the creati= on of the new process.So the new process doesn=3D92t have the lock on my lo= g file.

At the beginning of my application, I do :

log4net.Config.DOMConfigurator.Con= figure()
pLog =3D3D log4net.LogManager.GetLogger("MyFunction")

Ho= w can I test if the file is locked? So I will be able to develop a retry fu= nction after 30 seconds.

Thank you,

PS : sorry for my English= I am not very good in languages...

Nicolas



Centralis= ez tous vos comptes mails dans Hotmail ! Cr=E9ez un compte Hotmail, c'est gratuit ! = --_b2590187-6873-4cda-a7b2-472a5e576f2a_--