PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics Namespace / Log­Source Class / Log­Source Methods / Log­Source.​With­Level Method

LogSource.WithLevel Method

Exposes methods that allow to write messages and open activities with a specified LogLevel.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.1.0 (6.9.1.0)
Syntax
C#
public LogLevelSource WithLevel(
	LogLevel level
)

Parameters

level
Type: PostSharp.Patterns.Diagnostics.LogLevel
The desired LogLevel.

Return Value

Type: LogLevelSource
A fluent API object that allows to write messages with the specified level.
Remarks

This method is properly optimized. Subsequent calls with the same parameter value will return the same instance.

See Also