PostSharp 5.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics Namespace / Logger Class / Logger Methods / Logger.​For­Current­Context Method

Logger.ForCurrentContext Method

Gets a Logger for the current logging context, i.e. for the topmost logged method or custom activity.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public virtual Logger ForCurrentContext()

Return Value

Type: Logger
A Logger for the current logging context.
See Also