logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Question about the RollingFileAppender
Date Wed, 19 Apr 2006 21:14:40 GMT
Starting with version 1.2.9, you can define the locking model for a
FileAppender. The default value is an ExclusiveLock which means the
FileAppender has a lock on the file for the duration of the
application. The MinimalLock opens and closes the file on each write.
Here an example showing how to set the lockingModel property:

http://tinyurl.com/7sqon
http://logging.apache.org/log4net/release/config-examples.html#fileappender

--- lfn@danb64.com wrote:

> Does the RollingFileAppender (or the FileAppender) have the ability
> to have several processes all log to the same log file?  This would
> really be helpful, so if we have some bug that involves more than one
> process.  I guess it would have to open the file and prevent others
> from opening it in read/write mode in order for that to work, and it
> would probably also need to have retries built into it, so that if
> one of the other processes is currently writing to it, it keeps on
> trying.
> 
> BTW, I'm using log4net 1.1.1.  Not sure if that makes a difference.
> 
> Thanks in advance,
> 
> Dan
> 


Mime
View raw message