PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLogging­BackendOpen­Ephemeral­Context
Open sandboxFocus

LoggingBackend.OpenEphemeralContext Method

OpenEphemeralContext(ref LogMemberInfo)

Gets an EphemeralLoggingContext for use in a given method. An EphemeralLoggingContext is a degenerated kind of context, used to emit a single record.

Declaration
public EphemeralLoggingContext OpenEphemeralContext(ref LogMemberInfo logMemberInfo)
Parameters
Type Name Description
LogMemberInfo logMemberInfo

A reference to a LogMemberInfo describing the method in which the record will be emitted.

Returns
Type Description
EphemeralLoggingContext

An EphemeralLoggingContext.

OpenEphemeralContext(LoggingTypeSource, ref ThreadLoggingContext)

Gets an EphemeralLoggingContext for use in a given LoggingTypeSource. An EphemeralLoggingContext is a degenerated kind of context, used to emit a single record.

Declaration
public EphemeralLoggingContext OpenEphemeralContext(LoggingTypeSource source, ref ThreadLoggingContext threadContext)
Parameters
Type Name Description
LoggingTypeSource source

The LoggingTypeSource.

ThreadLoggingContext threadContext

The current ThreadLoggingContext.

Returns
Type Description
EphemeralLoggingContext

An EphemeralLoggingContext.