OnlyOnceErrorHandler ClassApache log4net™ SDK Documentation
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

SystemObject
  log4net.UtilOnlyOnceErrorHandler

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.6.0-.NET 4.0
Syntax

public class OnlyOnceErrorHandler : IErrorHandler

The OnlyOnceErrorHandler type exposes the following members.

Constructors

  NameDescription
Public methodOnlyOnceErrorHandler
Default Constructor
Public methodOnlyOnceErrorHandler(String)
Constructor
Top
Properties

  NameDescription
Public propertyEnabledDate
The date the first error that trigged this error handler occurred, or MinValue if it has not been triggered.
Public propertyEnabledDateUtc
The UTC date the first error that trigged this error handler occured, or MinValue if it has not been triggered.
Public propertyErrorCode
The error code from the first error that trigged this error handler.
Public propertyErrorMessage
The message from the first error that trigged this error handler.
Public propertyException
The exception from the first error that trigged this error handler.
Public propertyIsEnabled
Is error logging enabled
Top
Methods

  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodError(String)
Log an error
Public methodError(String, Exception)
Log an Error
Public methodError(String, Exception, ErrorCode)
Log an Error
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFirstError
Log the very first error
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReset
Reset the error handler back to its initial disabled state.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
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

Reference