logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pattenaude, Jerry" <Jerry.Pattena...@RedPrairie.com>
Subject RE: logging from web service and a web page
Date Mon, 17 Mar 2008 18:18:57 GMT
I've dug into my problem a little bit more and have some addition
information.  I'm still hoping that someone will have run into this
and/or knows this to be a limitation of the file appender.

 

My web service app and my asp.net app are separate visual studio
projects.  Both projects reference log4net.dll.  When aspnet_wp.exe
loads the applications it loads log4net.dll twice into the same
aspnet_wp process, but different app domains.  It appears that even with
minimal lock the file is still locked, so it cannot be used from a
different app domain in the same process.

 

Does anyone have any ideas on this?  Is it a log4net bug?

 

Thanks.

 

________________________________

Sent: Wednesday, March 12, 2008 1:10 PM
To: log4net-user@logging.apache.org
Subject: logging from web service and a web page

 

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

 

                <lockingModel
type="log4net.Appender.FileAppender+MinimalLock" />  

 

I've recently added another module to my site that does some session
management as part of the ASP.Net pipeline.  It is logging using the
same configuration file and the same output file.  Now the session
module is getting created first and all of its log messages are getting
through, but the ws app log messages are not being created.

 

I turned on the debug for log4net and am running DebugView and I get the
following

 

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

 

So just to recap the ws messages were getting through.  I added the
session dll and now its messages are getting through and not my ws
messages.  When I remove the session dll then the ws messages start
coming through again.

 

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

 

Do you have any idea what would cause this?

 

Thanks in advance,

jerry



This e-mail is confidential and is intended solely for the use of the addressee(s). Opinions
expressed are solely those of the author and may not be those of RedPrairie. 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, destroy
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 email and any attachments are believed to be free of any virus or other defects
which might affect any computer or IT system into which they are received, no responsibility
is accepted by RedPrairie for any loss or damage arising in any way from the receipt or use
therein.
Mime
View raw message