Open sandboxFocus

Interface IContextLocalLogger

Defines an abstraction of custom logging methods where the context has already been resolved.

Namespace: PostSharp.Patterns.Diagnostics.Custom
Assembly: PostSharp.Patterns.Common.dll
Syntax
public interface IContextLocalLogger : ILoggerExceptionHandler

Methods

Name Description
GetRecordBuilder(in CustomLogRecordOptions, ref CallerInfo, ILoggingContext)

Gets a record builder.

IsEnabled(LogLevel)

Determines whether logging is enabled for a given LogLevel.

OpenActivity(in OpenActivityOptions, ref CallerInfo)

Opens a new context for a custom activity.

ResumeActivity(ILoggingContext, ref CallerInfo)

Resumes an asynchronous activity suspended by the SuspendActivity(ILoggingContext, ref CallerInfo) method.

SetWaitDependency(ILoggingContext, object)

Sets the wait dependency of a given context, that is, the object that the context is waiting for.

SuspendActivity(ILoggingContext, ref CallerInfo)

Suspends an asynchronous activity, which can then be resumed by the ResumeActivity(ILoggingContext, ref CallerInfo) method.