Table of Contents

Class TraceSources

Namespace
Songhay.Diagnostics
Assembly
SonghayCore.dll

Singleton wrapper for TraceSource

public class TraceSources
Inheritance
TraceSources
Inherited Members
Extension Methods

Remarks

Based on Fonlow.Diagnostics by Zijian Huang [https://github.com/zijianhuang/Fonlow.Diagnostics] Also see “Use TraceSource Efficiently” [http://www.codeproject.com/Tips/1071853/Use-TraceSource-Efficiently]

Fields

DefaultTraceSourceName

The conventional TraceSource name.

public const string DefaultTraceSourceName = "rx-trace"

Field Value

string

Properties

ConfiguredTraceSourceName

The configured trace source name

public static string? ConfiguredTraceSourceName { get; set; }

Property Value

string

Instance

Gets the instance.

public static TraceSources Instance { get; }

Property Value

TraceSources

IsConfiguredTraceSourceNameLoaded

The is configured trace source name loaded?

public static bool IsConfiguredTraceSourceNameLoaded { get; }

Property Value

bool

this[string?]

Gets the TraceSource with the specified name.

public TraceSource? this[string? name] { get; }

Parameters

name string

The name.

Property Value

TraceSource

Methods

GetTraceSource(string?)

Gets the trace source.

public TraceSource? GetTraceSource(string? name)

Parameters

name string

The name.

Returns

TraceSource

GetTraceSourceFromConfiguredName()

Gets the name of the trace source from configuration.

public TraceSource? GetTraceSourceFromConfiguredName()

Returns

TraceSource

Remarks

When the trace source name is not configured then DefaultTraceSourceName is used.