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 Thu, 20 Apr 2006 01:23:04 GMT
The + notation is used to specify an inner class:

 public class FileAppender
   public class MinimalLock
    // inner class: FileAppender+MinimalLock

   public class ExclusiveLock
    // inner class: FileAppender+ExclusiveLock

The default behavior when there is no lockingModel specified is to use
the ExclusiveLock. Log4net has always used an exclusive lock style of
locking the log file. It wasn't until 1.2.9 that you could change this

Most people have discovered that ExclusiveLock is fast and MinimalLock
is slow. I think an AgressiveLock locking model that keeps the lock for
X seconds after the last message is written (in anticipation of another
message) would be helpful. This would make things fast for a lot of
messages and free up the file during periods of no messages. I haven't
given much thought to how it would be implemented :-/ I think NLog does
something like this already for its "no file lock" mode.

--- Matthew Brown <octavius@gmail.com> wrote:

> Random question, but is the "+" in "FileAppender+MinimalLock" some
> sort of special notation? Haven't seen this before...
> And I wish I had realized there was an ExclusiveLock lockingtype I
> could use back when I was working on an application in which we
> noticed it was slowing down considerably because we were logging at
> such a high frequency with MinimalLock enabled... :)

View raw message