Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 27427 invoked from network); 18 Mar 2008 00:02:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2008 00:02:33 -0000 Received: (qmail 9737 invoked by uid 500); 18 Mar 2008 00:02:30 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 9497 invoked by uid 500); 18 Mar 2008 00:02:29 -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 9486 invoked by uid 99); 18 Mar 2008 00:02:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 17:02:29 -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 (nike.apache.org: local policy) Received: from [68.142.200.119] (HELO web30506.mail.mud.yahoo.com) (68.142.200.119) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 18 Mar 2008 00:01:37 +0000 Received: (qmail 5322 invoked by uid 60001); 18 Mar 2008 00:01:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=sqc8+w9To3NvJOLaGmkSkr/R1l2NTUyEHPSK4wfO4aZG0LEP4T8VS0ujfAPviOobqK5ycCKyghCvd9NL3IfSemlNkSXFJC7NiiPeyhOCOyqbK8MzxB6rBY8pnsa3arK+BZfCZaJTA4pcuoU4uF0bVJYD+9eo5fCQRBIIVcX0x4I=; X-YMail-OSG: 3GC0FLIVM1l54AyHRGT01qjkv6ajfZ.wkne1pLENfafzigEoNoyarYCjhS.xyOo8kL5P7NcIgcR_jtpQtzQnuwF9uPx3IfYm8CQbitRq02Zct6NVaYY- Received: from [75.179.188.181] by web30506.mail.mud.yahoo.com via HTTP; Mon, 17 Mar 2008 17:01:55 PDT X-Mailer: YahooMailRC/902.38 YahooMailWebService/0.7.162 Date: Mon, 17 Mar 2008 17:01:55 -0700 (PDT) From: Ron Grabowski Subject: Re: logging from web service and a web page To: Log4NET User MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-139374659-1205798515=:4704" Message-ID: <26577.4704.qm@web30506.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-139374659-1205798515=:4704 Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: quoted-printable Two processes cannot have an exclusive lock on a file. The minimal lock (as= the name implies) does in fact lock the file for a short period of time. A= mutex is a good way to allow multiple processes to coordinate file writes:= =0A=0Ahttp://www.mail-archive.com/log4net-user@logging.apache.org/msg04116.= html=0A=0AA similiar locking model will most likely be included in the next= release.=0A=0A----- Original Message ----=0AFrom: "Pattenaude, Jerry" =0ATo: Log4NET User =0ASent: Monday, March 17, 2008 2:18:57 PM=0ASubject: RE: logging fr= om web service and a web page=0A=0A =0A=0AI=A2ve dug into my problem a little=0Abit m= ore and have some addition information. I=A2m still hoping that=0Asomeone = will have run into this and/or knows this to be a limitation of the=0Afile = appender.=0A =0A My web service app and my asp.net app are=0Aseparate vis= ual studio projects. Both projects reference log4net.dll. When=0Aaspnet_w= p.exe loads the applications it loads log4net.dll twice into the same aspne= t_wp=0Aprocess, but different app domains. It appears that even with minim= al lock the=0Afile is still locked, so it cannot be used from a different a= pp domain in the=0Asame process.=0A =0A Does anyone have any ideas on thi= s? Is it=0Aa log4net bug?=0A =0A Thanks.=0A =0A =0ASent:Wednesday, Mar= ch 12, 2008 1:10 PM=0ATo:log4net-user@logging.apache.org=0ASubject: logging= from web serviceand a web page=0A =0A =0A I have had a web service loggin= g for a while now and it=0Aworks great (I=A2ll call it ws). The log4net.dl= l runs in the standard=0Aaspnet_wp.exe and logs using the rollingfileappend= er with minimal lock.=0A =0A =0A =0A =0A I=A2ve recently adde= d another module to my site that=0Adoes some session management as part of = the ASP.Net pipeline. It is=0Alogging using the same configuration file an= d the same output file. Now=0Athe session module is getting created first = and all of its log messages are=0Agetting through, but the ws app log messa= ges are not being created.=0A =0A I turned on the debug for log4net and a= m running DebugView=0Aand I get the following=0A =0A log4net:ERROR [Rolli= ngFileAppender] Unable to acquire lock=0Aon file c:\log\Log.txt. Access to = the path 'c:\log\Log.txt' is denied.=0A =0A So just to recap the ws messa= ges were getting through. =0AI added the session dll and now its messages a= re getting through and not my ws=0Amessages. When I remove the session dll= then the ws messages start coming=0Athrough again.=0A =0A Oh and just to= add a little more info when I turn on the=0AEvent Log Appender all the mes= sages get logged.=0A =0A Do you have any idea what would cause this?=0A = =0A Thanks in advance,=0A jerry=0A =0A=0A=0AThis e-mail is confidential an= d is intended solely for the use of the addressee(s). Content is not to be= relied upon by any person other than the addressee(s), without prior writt= en approval of RedPrairie. If you are not the intended recipient, please no= tify us immediately, destroy any copies and delete from your computer syste= ms.=0A =0AIf you have received this e-mail in error, any use, disclosure, d= issemination, forwarding, printing or copying is strictly prohibited.=0AAlt= hough this email and any attachments are believed to be free of any virus o= r other defects which might affect any computer or IT system into which the= y are received, no responsibility is accepted by RedPrairie for any loss or= damage arising in any way from the receipt or use therein.=0A=0A=0A=0A=0A= =0A --0-139374659-1205798515=:4704 Content-Type: text/html; charset=iso-8859-7 Content-Transfer-Encoding: quoted-printable
Two processes cannot have an exclusive lock on a fi= le. The minimal lock (as the name implies) does in fact lock the file for a= short period of time. A mutex is a good way to allow multiple processes to= coordinate file writes:

http://w= ww.mail-archive.com/log4net-user@logging.apache.org/msg04116.html

A similiar locking model will most likely be included in the next = release.

----- Original Message ----
From: "Pattenaude, J= erry" <Jerry.Pattenaude@RedPrairie.com>
To: Log4NET User <log4net-user@logging.apache.org>
Sent: Monday, March 17, 2008 2:= 18:57 PM
Subject: RE: logging from web service and a web page

=0A= =0A=0A =0A =0A=0A=0A=0A=0A=0A
=0A=0A

I=A2ve dug into my proble= m a little=0Abit more and have some addition information.  I=A2m still= hoping that=0Asomeone will have run into this and/or knows this to be a li= mitation of the=0Afile appender.

=0A=0A

 

=0A=0A=

My web service= app and my asp.net app are=0Aseparate visual studio projects.  Both p= rojects reference log4net.dll.  When=0Aaspnet_wp.exe loads the applica= tions it loads log4net.dll twice into the same aspnet_wp=0Aprocess, but dif= ferent app domains.  It appears that even with minimal lock the=0Afile= is still locked, so it cannot be used from a different app domain in the= =0Asame process.

=0A=0A

 

=0A=0A

Does anyone have any ideas on = this?  Is it=0Aa log4net bug?

=0A=0A

 

=0A= =0A

Thanks.

=0A=0A

 

=0A=0A
=0A=0A
=0A=0A
=0A=0A
=0A=0A

Sent:=0AWednesday, = March 12, 2008 1:10 PM
=0ATo:=0Alog4net-user@logging.apache.org
=0ASubject: logging from web service=0Aand a web page

=0A=0A
=0A=0A

 

=0A=0A

= I have had a web service logging for a while now and it=0Aworks great (I=A2= ll call it ws).  The log4net.dll runs in the standard=0Aaspnet_wp.exe = and logs using the rollingfileappender with minimal lock.

= =0A=0A

 

=0A=0A<= p class=3D"MsoNormal">       &= nbsp;   =0A    <lockingModel type=3D"log4n= et.Appender.FileAppender+MinimalLock"=0A/> 

=0A= =0A

 

=0A=0A

I=A2ve recently added another module to my site t= hat=0Adoes some session management as part of the ASP.Net pipeline.  I= t is=0Alogging using the same configuration file and the same output file.&= nbsp; Now=0Athe session module is getting created first and all of its log = messages are=0Agetting through, but the ws app log messages are not being c= reated.

=0A=0A

 

=0A=0A

I turned on the debu= g for log4net and am running DebugView=0Aand I get the following

=0A=0A

 

= =0A=0A

log4net:ERROR [RollingFileAppender] = Unable to acquire lock=0Aon file c:\log\Log.txt. Access to the path 'c:\log= \Log.txt' is denied.

=0A=0A

 

=0A=0A

So just= to recap the ws messages were getting through. =0AI added the session= dll and now its messages are getting through and not my ws=0Amessages.&nbs= p; When I remove the session dll then the ws messages start coming=0Athroug= h again.

=0A=0A

 

=0A=0A

Oh and just to add = a little more info when I turn on the=0AEvent Log Appender all the messages= get logged.

=0A=0A

&nbs= p;

=0A=0A

Do you have any= idea what would cause this?

=0A=0A

 

=0A=0A

Thanks in advance,

=0A=0A

This e-mail is confidential and is intended solely for the us= e of the addressee(s).  Content is not to be relied upon by any person= other than the addressee(s), without prior written approval of RedPrairie.= If you are not the intended recipient, please notify us immediately, destr= oy any copies and delete from your computer systems.
 
If you have received this e-mail in error, any use, disclosure, dissemination= , forwarding, printing or copying is strictly prohibited.

Although this e= mail and any attachments are believed to be free of any virus or other defe= cts which might affect any computer or IT system into which they are receiv= ed, no responsibility is accepted by RedPrairie for any loss or damage aris= ing in any way from the receipt or use therein.


--0-139374659-1205798515=:4704--