PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLogging­Abstract­Source
Open sandboxFocus

LoggingAbstractSource Class

Exposes the current LoggingTypeSource for a given role and System.Type.

Inheritance
System.Object
LoggingAbstractSource
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public sealed class LoggingAbstractSource : Object, ILogger3, ILogger2, ILogger, ILoggerExceptionHandler

Properties

Name Description
DefaultState

Gets the default LoggingSourceLocalState, i.e. the state when there is the context-local configuration has not been overridden by WithContextLocalConfiguration(LoggingContextLocalConfiguration).

Role

Gets the role.

Source

Gets the LoggingTypeSource currently assigned to Role and Type.

SourceName

Gets the name that this source is associated with. This can't be null.

Type

Gets the System.Type that this source is associated with. This may be null if the source is based on a logger name.

Methods

Name Description
GetLocalState(out LoggingSourceLocalState)

Gets the LoggingSourceLocalState resolved for the current execution context. This method is used by generated code.

IsEnabled(LogLevel)

Determines whether logging is enabled for a given LogLevel for the current Role and Type.

Explicit Interface Implementations

Name Description
ILogger.ActivityOptions
ILogger.IsEnabled(LogLevel)
ILogger.OpenActivity(LogActivityOptions, ref CallerInfo)
ILogger.RequiresSuspendResume
ILogger.ResumeActivity(ILoggingContext, ref CallerInfo)
ILogger.Role
ILogger.SetWaitDependency(ILoggingContext, Object)
ILogger.SuspendActivity(ILoggingContext, ref CallerInfo)
ILogger.Type
ILogger.Write(ILoggingContext, LogLevel, LogRecordKind, String, Exception, ref CallerInfo)
ILogger.Write(ILoggingContext, LogLevel, LogRecordKind, String, Object[], Exception, ref CallerInfo)
ILogger.Write<T1>(ILoggingContext, LogLevel, LogRecordKind, String, T1, Exception, ref CallerInfo)

Writes a custom log record with 1 parameter.

ILogger.Write<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Exception, ref CallerInfo)

Writes a custom log record with 10 parameters.

ILogger.Write<T1, T2>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, Exception, ref CallerInfo)

Writes a custom log record with 2 parameters.

ILogger.Write<T1, T2, T3>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, Exception, ref CallerInfo)

Writes a custom log record with 3 parameters.

ILogger.Write<T1, T2, T3, T4>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, Exception, ref CallerInfo)

Writes a custom log record with 4 parameters.

ILogger.Write<T1, T2, T3, T4, T5>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, T5, Exception, ref CallerInfo)

Writes a custom log record with 5 parameters.

ILogger.Write<T1, T2, T3, T4, T5, T6>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, T5, T6, Exception, ref CallerInfo)

Writes a custom log record with 6 parameters.

ILogger.Write<T1, T2, T3, T4, T5, T6, T7>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, T5, T6, T7, Exception, ref CallerInfo)

Writes a custom log record with 7 parameters.

ILogger.Write<T1, T2, T3, T4, T5, T6, T7, T8>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, T5, T6, T7, T8, Exception, ref CallerInfo)

Writes a custom log record with 8 parameters.

ILogger.Write<T1, T2, T3, T4, T5, T6, T7, T8, T9>(ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, T5, T6, T7, T8, T9, Exception, ref CallerInfo)

Writes a custom log record with 9 parameters.

ILogger2.CurrentContext
ILogger2.Factory
ILogger2.GetContextLocalLogger()
ILogger3.Factory
ILogger3.GetContextLocalLogger(LogLevel)
ILoggerExceptionHandler.OnInternalException(Exception)
ILoggerExceptionHandler.OnInvalidUserCode(ref CallerInfo, String, Object[])