PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / Log­Level­Source Class / Log­Level­Source Properties / Log­Level­Source.​Enabled­Or­Null Property

LogLevelSource.EnabledOrNull Property

Returns the current LogLevelSource, or null if logging is not enabled for the current instance. This property allows to write conditional logging using the ?. operator.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
public LogLevelSource EnabledOrNull { get; }

Property Value

Type: LogLevelSource
See Also