PostSharp6.8//API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Log­Source Class/Log­Source Methods/Log­Source.​With­Levels Method

LogSource.WithLevels Method

Returns a new LogSource based on the current instance, but overrides the default logging levels.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.8.6.0 (6.8.6.0)
Syntax
C#
public LogSource WithLevels(
	LogLevel defaultLevel,
	LogLevel failureLevel
)

Parameters

defaultLevel
Type: PostSharp.Patterns.Diagnostics.LogLevel
The LogLevel for the Default severity (also used for the start and success messages of activities).
failureLevel
Type: PostSharp.Patterns.Diagnostics.LogLevel
The LogLevel for the Failure severity (also used for the failure messages of activities).

Return Value

Type: LogSource
A new LogSource with the specified log levels.
See Also