Class TraceSourceExtensions
- Namespace
- Songhay.Extensions
- Assembly
- SonghayCore.dll
Extensions of TraceSource
public static class TraceSourceExtensions
- Inheritance
-
TraceSourceExtensions
- Inherited Members
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]
Methods
TraceError(TraceSource?, Exception)
Traces the error.
public static void TraceError(this TraceSource? traceSource, Exception ex)
Parameters
traceSourceTraceSourceThe trace source.
exExceptionThe exception.
TraceError(TraceSource?, Exception?, bool)
Traces the error.
public static void TraceError(this TraceSource? traceSource, Exception? ex, bool includeStackTrace)
Parameters
traceSourceTraceSourceThe trace source.
exExceptionThe exception.
includeStackTraceboolWhen
true, include StackTrace info.
TraceError(TraceSource?, string)
Traces the error.
public static void TraceError(this TraceSource? traceSource, string message)
Parameters
traceSourceTraceSourceThe trace source.
messagestringThe message.
TraceError(TraceSource?, string, params object[])
Traces the error.
public static void TraceError(this TraceSource? traceSource, string format, params object[] args)
Parameters
traceSourceTraceSourceThe trace source.
formatstringThe format.
argsobject[]The arguments.
TraceVerbose(TraceSource?, string)
Trace event type Verbose
public static void TraceVerbose(this TraceSource? traceSource, string message)
Parameters
traceSourceTraceSourceThe trace source.
messagestringThe message.
TraceVerbose(TraceSource?, string, params object[])
Trace event type Verbose
public static void TraceVerbose(this TraceSource? traceSource, string format, params object[] args)
Parameters
traceSourceTraceSourceThe trace source.
formatstringThe format.
argsobject[]The arguments.
TraceWarning(TraceSource?, string)
Trace event type Warning
public static void TraceWarning(this TraceSource? traceSource, string message)
Parameters
traceSourceTraceSourceThe trace source.
messagestringThe message.
TraceWarning(TraceSource?, string, params object[])
Trace event type Warning
public static void TraceWarning(this TraceSource? traceSource, string format, params object[] args)
Parameters
traceSourceTraceSourceThe trace source.
formatstringThe format.
argsobject[]The arguments.
WithSourceLevels(TraceSource?)
Returns the TraceSource with Switch Level All.
public static TraceSource? WithSourceLevels(this TraceSource? traceSource)
Parameters
traceSourceTraceSourceThe trace source.
Returns
WithSourceLevels(TraceSource?, SourceLevels)
Returns the TraceSource with the specified SourceLevels.
public static TraceSource? WithSourceLevels(this TraceSource? traceSource, SourceLevels levels)
Parameters
traceSourceTraceSourceThe trace source.
levelsSourceLevelsThe levels.
Returns
WriteLine(TraceSource?, string)
Trace event type Information
public static void WriteLine(this TraceSource? traceSource, string message)
Parameters
traceSourceTraceSourceThe trace source.
messagestringThe message.
Remarks
This member was previously marked with ObsoleteAttribute. For detail, see https://github.com/BryanWilhite/SonghayCore/issues/82#issuecomment-566214635
WriteLine(TraceSource?, string, params object[])
Trace event type Information
public static void WriteLine(this TraceSource? traceSource, string format, params object[] args)
Parameters
traceSourceTraceSourceThe trace source.
formatstringThe format.
argsobject[]The arguments.
Remarks
This member was previously marked with ObsoleteAttribute. For detail, see https://github.com/BryanWilhite/SonghayCore/issues/82#issuecomment-566214635