Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 14364 invoked from network); 14 Nov 2006 19:38:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2006 19:38:44 -0000 Received: (qmail 117 invoked by uid 500); 14 Nov 2006 19:38:53 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 99997 invoked by uid 500); 14 Nov 2006 19:38:53 -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 99986 invoked by uid 99); 14 Nov 2006 19:38:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2006 11:38:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [207.47.12.4] (HELO egateway.symyx.com) (207.47.12.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2006 11:38:40 -0800 Received: from SRV-SCAN.symyx.com (srv-scan.symyx.com [172.16.13.202]) by egateway.symyx.com (8.12.9/8.12.9) with ESMTP id kAEJdrjN029560 for ; Tue, 14 Nov 2006 11:39:59 -0800 (PST) Received: from srv-be-101.Symyx-IC.symyx.com ([192.168.0.31]) by srv-sc-mail.symyx.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 14 Nov 2006 11:39:41 -0800 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Subject: RE: RollingFileAppender & concurrency X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Date: Tue, 14 Nov 2006 11:39:41 -0800 Message-ID: <515335F32AA04440B3DE6FEA1993E9AD01C09044@srv-be-101.symyx-ic.symyx.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: RollingFileAppender & concurrency Thread-Index: AccHnzApfDN+NqtKSFmozzLwRz87CwAg6+Uw From: "Steve Burkett" To: , X-OriginalArrivalTime: 14 Nov 2006 19:39:41.0992 (UTC) FILETIME=[A136DA80:01C70824] X-Virus-Checked: Checked by ClamAV on apache.org (thanks Ron for your help on this! :) After researching this a bit, neither %processid nor minimal lock is = ideal. What would be ideal, is if I could hook into the = rollingfileappender's File property so that we can try something like = this: (1) create a name (like Foo.log, based on the file name specified in = the config file for the rollingfileappender) (2) try to open the file=20 (3) if it opens, good, that's the file name (4) if it doesn't, then try another using a deterministic pattern: (e.g. = "Foo.log.Alt1"), until the appender can file a file name that is not = locked. This file name then be the basis for rolling file names (like = Foo.log.Alt1.1) We need file names to be deterministic, but work in a webgarden = scenario. -----Original Message----- From: Ron Grabowski [mailto:rongrabowski@yahoo.com]=20 Sent: Monday, November 13, 2006 7:42 PM To: log4net-user@logging.apache.org Subject: Re: RollingFileAppender & concurrency If you want the processid pattern to be processed, you need to use a = file node with type PatternString: Have you tried an appender node that uses the alternate lockingModel = node and PatternString file type? ----- Original Message ---- From: Steve Burkett To: Log4NET User ; = rongrabowski@yahoo.com Sent: Monday, November 13, 2006 8:46:33 PM Subject: RE: RollingFileAppender & concurrency I just saw this blog entry that suggest using %processid. This would be = ideal... = http://piers7.blogspot.com/2006/02/using-log4nets-fileappender-in-web.htm= l However, on my system, using Created a file name " [%processid]LoadTest.log", and showed same locking = contentions. We have to use rollingfileappenders, because our customers require us to = have NO additional dependencies on databases.=20 -----Original Message----- From: Ron Grabowski [mailto:rongrabowski@yahoo.com] Sent: Monday, November 13, 2006 5:18 PM To: Log4NET User Subject: Re: RollingFileAppender & concurrency Are you generating a lot of logs? Keep in mind that the = RollingFileAppender is not a database. Have you looking using something = like MSDE and the AdoNetAppender as a storage place for logs on each = machine? This link shows how to setup an alternate locking model on a = FileAppender: http://logging.apache.org/log4net/release/config-examples.html#fileappend= er Opening and closing a file after each write will never be as fast as an = exclusive lock. ----- Original Message ---- From: Steve Burkett To: log4net-user@logging.apache.org Sent: Monday, November 13, 2006 6:50:25 PM Subject: RollingFileAppender & concurrency Hello, =20 We have a .Net v2 asp.net webservice that uses log4net. Our customers = want to run our product in a webgarden (multiple processes running on = the same machine). Each process, uses the same web.config, and thus the = same RollingFileAppender file name. =20 Will the service interleave the log calls to the single file correct? = (a simple test I did with a console app, running in two windows, = didn=A2t interleave correctly). =20 Is there a switch on RollingFileAppender to allow concurrency? = Another (file based) appender? =20 Thanks! J =3D=3D=3D=3D=3D=3D=3D Notice: This e-mail message, together with any attachments, contains information of Symyx Technologies, Inc. or any of its affiliates or subsidiaries that may be confidential, proprietary, copyrighted, privileged and/or protected work product, and is meant solely for the intended recipient. If you are not the intended recipient, and have received this message in error, please contact the sender immediately, permanently delete the original and any copies of this email and any attachments thereto.