Open sandboxFocus

Interface IFlashtraceLogger

Abstraction of the Logging facility, through which other components emit their log records.

Namespace: Flashtrace
Assembly: Flashtrace.dll
Syntax
public interface IFlashtraceLogger : IFlashtraceExceptionHandler
Remarks

If you want to implement this interface, you should also implement the IFlashtraceRoleLoggerFactory interface and register it to the IServiceProvider or, if you use the dependency mechanism, to FlashtraceSourceFactory.

Properties

Name Description
CurrentContext

Gets the current ILoggingContext.

Factory

Gets a factory that can provide instances of IFlashtraceLogger.

RequiresSuspendResume

Gets a value indicating whether calls of SuspendActivity(ILoggingContext, in CallerInfo) and ResumeActivity(ILoggingContext, in CallerInfo) are required for asynchronous activities in the current context.

Role

Gets the role of records created by this IFlashtraceLogger. A list of standard roles is available in the FlashtraceRole class.

Methods

Name Description
GetContextLocalLogger()

Gets the logger for the current context.

GetContextLocalLogger(FlashtraceLevel)

Gets the IFlashtraceLocalLogger plus a flag indicating whether the source is enabled for a given FlashtraceLevel.

IsEnabled(FlashtraceLevel)

Determines whether logging is enabled for a given FlashtraceLevel.

OpenActivity(in LogActivityOptions, in CallerInfo)

Opens an activity.

ResumeActivity(ILoggingContext, in CallerInfo)

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

SetWaitDependency(ILoggingContext, object)

Sets the wait dependency for a given context, i.e. give information about what the given context is waiting (or awaiting) for.

SuspendActivity(ILoggingContext, in CallerInfo)

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

Write(ILoggingContext?, FlashtraceLevel, LogRecordKind, string, Exception?, in CallerInfo)

Writes a log record with a description without parameters.

Write(ILoggingContext, FlashtraceLevel, LogRecordKind, string, object[], Exception?, in CallerInfo)

Writes a log record with a description with an array of parameters.

Write<T1>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, Exception, in CallerInfo)

Writes a log record with 1 parameter.

Write<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Exception, in CallerInfo)

Writes a log record with 10 parameters.

Write<T1, T2>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, Exception, in CallerInfo)

Writes a log record with 2 parameters.

Write<T1, T2, T3>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, Exception, in CallerInfo)

Writes a log record with 3 parameters.

Write<T1, T2, T3, T4>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, T4, Exception, in CallerInfo)

Writes a log record with 4 parameters.

Write<T1, T2, T3, T4, T5>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, T4, T5, Exception, in CallerInfo)

Writes a log record with 5 parameters.

Write<T1, T2, T3, T4, T5, T6>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, T4, T5, T6, Exception, in CallerInfo)

Writes a log record with 6 parameters.

Write<T1, T2, T3, T4, T5, T6, T7>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, T4, T5, T6, T7, Exception, in CallerInfo)

Writes a log record with 7 parameters.

Write<T1, T2, T3, T4, T5, T6, T7, T8>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, T4, T5, T6, T7, T8, Exception, in CallerInfo)

Writes a log record with 8 parameters.

Write<T1, T2, T3, T4, T5, T6, T7, T8, T9>(ILoggingContext, FlashtraceLevel, LogRecordKind, string, T1, T2, T3, T4, T5, T6, T7, T8, T9, Exception, in CallerInfo)

Writes a log record with 9 parameters.