logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramaa Davanagere <RDAVA...@mobius.com>
Subject RE: What do I need to do to get rid of this error? Please help
Date Fri, 04 Nov 2005 17:12:23 GMT
 

I wish it was that easy!!!!

 

I have multiple components (20+) using the same log file for logging
messages.  I don't think I can check which of the components is currently
locking the files, before writing log messages.

 

How do I resolve this?

 

-----Original Message-----
From: Shireesh Thanneru [mailto:thanneru@yahoo.com] 
Sent: Friday, November 04, 2005 11:55 AM
To: Log4NET User
Subject: Re: What do I need to do to get rid of this error? Please help

 

You need to make sure that no other process/program is accessing the the
file at "C:\Program Files\Mobius\contenuity\LogFiles\vdrconBOLog.txt"

so that log4net can acquire a lock on that file.

Ramaa Davanagere <RDAVANAG@mobius.com> wrote:

 

 

log4net: RollingFileAppender: Searched for existing files in [C:\Program
Files\Mobius\contenuity\LogFiles]

log4net: RollingFileAppender: curSizeRollBackups starts at [0]

log4net: FileAppender: Opening file for writing [C:\Program
Files\Mobius\contenuity\LogFiles\vdrconBOLog.txt] append [True]

log4net:ERROR [RollingFileAppender] Unable to acquire lock on file
C:\Program Files\Mobius\contenuity\LogFiles\vdrconBOLog.txt. The process
cannot access the file "C:\Program
Files\Mobius\contenuity\LogFiles\vdrconBOLog.txt" because it is being used
by another process.

log4net:ERROR [RollingFileAppender] OpenFile(C:\Program
Files\Mobius\contenuity\LogFiles\vdrconBOLog.txt,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: FileAppender: Opening file for writing [C:\Program
Files\Mobius\contenuity\LogFiles\vdrconBOLog.txt] append [True] 


Mime
View raw message