PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / ILogger3 Interface / ILogger3 Methods / ILogger3.​Get­Context­Local­Logger Method / ILogger3.​Get­Context­Local­Logger Method (Log­Level)

ILogger3.GetContextLocalLogger Method (LogLevel)

Gets the IContextLocalLogger plus a flag indicating whether the source is enabled for a given LogLevel.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
(IContextLocalLogger logger, bool isEnabled) GetContextLocalLogger(
	LogLevel level
)

Parameters

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

Return Value

Type: ValueTuple<IContextLocalLogger, Boolean>
The IContextLocalLogger for the current execution context and a flag indicating whether logging is enabled for the given level.
See Also