Table of Contents

Class LevelEvaluator

Namespace
log4net.Core
Assembly
log4net.dll

An evaluator that triggers at a threshold level

public class LevelEvaluator : ITriggeringEventEvaluator
Inheritance
LevelEvaluator
Implements
Inherited Members

Remarks

This evaluator will trigger if the level of the event passed to IsTriggeringEvent(LoggingEvent) is equal to or greater than the Threshold level.

Constructors

LevelEvaluator()

Create a new evaluator using the Off threshold.

public LevelEvaluator()

Remarks

Create a new evaluator using the Off threshold.

This evaluator will trigger if the level of the event passed to IsTriggeringEvent(LoggingEvent) is equal to or greater than the Threshold level.

LevelEvaluator(Level)

Create a new evaluator using the specified Level threshold.

public LevelEvaluator(Level threshold)

Parameters

threshold Level

the threshold to trigger at

Remarks

Create a new evaluator using the specified Level threshold.

This evaluator will trigger if the level of the event passed to IsTriggeringEvent(LoggingEvent) is equal to or greater than the Threshold level.

Properties

Threshold

the threshold to trigger at

public Level Threshold { get; set; }

Property Value

Level

The Level that will cause this evaluator to trigger

Remarks

This evaluator will trigger if the level of the event passed to IsTriggeringEvent(LoggingEvent) is equal to or greater than the Threshold level.

Methods

IsTriggeringEvent(LoggingEvent)

Is this loggingEvent the triggering event?

public bool IsTriggeringEvent(LoggingEvent loggingEvent)

Parameters

loggingEvent LoggingEvent

The event to check

Returns

bool

This method returns true, if the event level is equal or higher than the Threshold. Otherwise it returns false

Remarks

This evaluator will trigger if the level of the event passed to IsTriggeringEvent(LoggingEvent) is equal to or greater than the Threshold level.