You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by "Kremer, Mark" <MK...@zolldata.com> on 2005/06/20 19:41:51 UTC

logging web services

I am trying to log from a web service, and am getting errors about acquiring locks on the output file. What extra steps need to be performed to use log4net to log web services? Here is my internal debugging:


log4net:ERROR [RollingFileAppender] Unable to acquire lock on file c:\inetpub\wwwroot\log4net_webservice_prototype\arc_prototype.Form1.log. Access to the path "c:\inetpub\wwwroot\log4net_webservice_prototype\arc_prototype.Form1.log" is denied.
log4net: FileAppender: Opening file for writing [c:\inetpub\wwwroot\log4net_webservice_prototype\arc_prototype.Form1.log] append [True]
log4net:ERROR [RollingFileAppender] Unable to acquire lock on file c:\inetpub\wwwroot\log4net_webservice_prototype\arc_prototype.Form1.log. Access to the path "c:\inetpub\wwwroot\log4net_webservice_prototype\arc_prototype.Form1.log" is denied.
log4net:ERROR [RollingFileAppender] OpenFile(c:\inetpub\wwwroot\log4net_webservice_prototype\arc_prototype.Form1.log,True) call failed.
LockStateException: The file is not currently locked
   at log4net.Appender.LockingStream.AssertLocked()
   at log4net.Appender.LockingStream.get_CanWrite()
   at System.IO.StreamWriter..ctor(Stream stream, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(Stream stream, Encoding encoding)
   at log4net.Appender.FileAppender.OpenFile(String fileName, Boolean append)
   at log4net.Appender.RollingFileAppender.OpenFile(String fileName, Boolean append)
   at log4net.Appender.FileAppender.SafeOpenFile(String fileName, Boolean append)
log4net:ERROR [RollingFileAppender] No output stream or file set for the appender named [Form1RollingFile].

__________________________________________________

Mark Kremer                        
User Interface Specialist                             
ZOLL Data Systems
				      
12202 Airport Way, Suite 300
Broomfield, Colorado 80021 
		 
O (303) 801-1833
F (303) 801-0001
www.zolldata.com