Logger IsEnabledFor Method | Apache log4net™ SDK Documentation

Checks if this logger is enabled for a given Level passed as parameter.

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

C#
VB
C++
F#
Copy

    public virtual bool IsEnabledFor(
    	Level level
    )

    Public Overridable Function IsEnabledFor (
    	level As Level
    ) As Boolean

    public:
    virtual bool IsEnabledFor(
    	Level^ level
    )

    abstract IsEnabledFor :
            level : Level -> bool
    override IsEnabledFor :
            level : Level -> bool

#### Parameters

level
  Type: log4net.Core
  Level
  The level to check.

#### Return Value

Type: Boolean
true if this logger is enabled for level, otherwise false.

#### Implements

ILogger
IsEnabledFor(Level)
Remarks

Test if this logger is going to log events of the specified level.

This method must not throw any exception to the caller.

See Also

#### Reference

Logger Class
log4net.Repository.Hierarchy Namespace