PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLogging­Abstract­SourceIs­Enabled
Open sandboxFocus

LoggingAbstractSource.IsEnabled Method

IsEnabled(LogLevel)

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

Declaration
public bool IsEnabled(LogLevel level)
Parameters
Type Name Description
LogLevel level

A LogLevel.

Returns
Type Description
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.