Log4net supports a pluggable file locking mechanism. The default implementation 
is to use an exclusive lock. You should consider using a MinimalLock:

 
http://logging.apache.org/log4net/release/sdk/log4net.Appender.FileAppender.MinimalLock.html

which would allow multiple processes to write to it.



----- Original Message ----
From: Pradeeptp <[EMAIL PROTECTED]>
To: log4net-dev@logging.apache.org
Sent: Thursday, September 11, 2008 8:27:02 AM
Subject: Same file read/write from Multiple process


Hi All,

I am considering to use Log4Net in a web service to write to a single log
file. I want to know whether writing to a single file in this manner through
Log4Net is safe.  The current code I have implemented is in C# in which I am
writing to a single file which gives me error "The process cannot access the
file XXXXX because it is beign used by another process" 

To resolve the above problem I am considering using Log4Net.  If anyone has
any experience in using Log4Net please confirm me that this error will not
happen in Log4Net.

Thanks
pradeeptp
-- 
View this message in context: 
http://www.nabble.com/Same-file-read-write-from-Multiple-process-tp19433666p19433666.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.

Reply via email to