Implements log4net's default error handling policy which consists
of emitting a message for the first error in an appender and
ignoring all subsequent errors.
Inheritance Hierarchy
log4net.UtilOnlyOnceErrorHandler
Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax
The OnlyOnceErrorHandler type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | OnlyOnceErrorHandler |
Default Constructor
|
![]() | OnlyOnceErrorHandler(String) |
Constructor
|
Properties
Name | Description | |
---|---|---|
![]() | EnabledDate |
The date the first error that trigged this error handler occurred, or MinValue if it has not been triggered.
|
![]() | EnabledDateUtc |
The UTC date the first error that trigged this error handler occured, or MinValue if it has not been triggered.
|
![]() | ErrorCode |
The error code from the first error that trigged this error handler.
|
![]() | ErrorMessage |
The message from the first error that trigged this error handler.
|
![]() | Exception |
The exception from the first error that trigged this error handler.
|
![]() | IsEnabled |
Is error logging enabled
|
Methods
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Error(String) |
Log an error
|
![]() | Error(String, Exception) |
Log an Error
|
![]() | Error(String, Exception, ErrorCode) |
Log an Error
|
![]() | Finalize |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) |
![]() | FirstError |
Log the very first error
|
![]() | GetHashCode |
Serves as a hash function for a particular type.
(Inherited from Object.) |
![]() | GetType |
Gets the Type of the current instance.
(Inherited from Object.) |
![]() | MemberwiseClone |
Creates a shallow copy of the current Object.
(Inherited from Object.) |
![]() | Reset |
Reset the error handler back to its initial disabled state.
|
![]() | ToString | (Inherited from Object.) |
Remarks
The error message is processed using the LogLog sub-system by default.
This policy aims at protecting an otherwise working application from being flooded with error messages when logging fails.
See Also