PostSharp6.5//API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logging­Abstract­Source Class/Logging­Abstract­Source Methods/Logging­Abstract­Source.​Is­Enabled Method

LoggingAbstractSource.IsEnabled Method

Determines whether logging is enabled for a given LogLevel for the current Role and Type.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.5.15.0 (6.5.15.0)
Syntax
C#
public bool IsEnabled(
	LogLevel level
)

Parameters

level
Type: PostSharp.Patterns.Diagnostics.LogLevel
A LogLevel.

Return Value

Type: Boolean
true if logging is enabled, otherwise false.
Remarks

In case of exception in the logic of this method, this method will report the exception to the ExceptionHandler and return false.

See Also