FileAppender LockingModel Property | Apache log4net™ SDK Documentation

Gets or sets the LockingModel used to handle locking of the file.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public FileAppenderLockingModelBase LockingModel { get; set; }

    Public Property LockingModel As FileAppenderLockingModelBase
    	Get
    	Set

    public:
    property FileAppenderLockingModelBase^ LockingModel {
    	FileAppenderLockingModelBase^ get ();
    	void set (FileAppenderLockingModelBase^ value);
    }

    member LockingModel : FileAppenderLockingModelBase with get, set

#### Property Value

Type: FileAppender
LockingModelBase
The LockingModel used to lock the file.
Remarks

Gets or sets the LockingModel used to handle locking of the file.

There are three built in locking models, FileAppender
ExclusiveLock, FileAppender
MinimalLock and FileAppender
InterProcessLock . The first locks the file from the start of logging to the end, the second locks only for the minimal amount of time when logging each message and the last synchronizes processes using a named system wide Mutex.

The default locking model is the FileAppender
ExclusiveLock.

See Also

#### Reference

FileAppender Class
log4net.Appender Namespace