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
traceSource
TraceSourceThe trace source.
ex
ExceptionThe exception.
TraceError(TraceSource?, Exception?, bool)
Traces the error.
public static void TraceError(this TraceSource? traceSource, Exception? ex, bool includeStackTrace)
Parameters
traceSource
TraceSourceThe trace source.
ex
ExceptionThe exception.
includeStackTrace
boolWhen
true
, include StackTrace info.
TraceError(TraceSource?, string)
Traces the error.
public static void TraceError(this TraceSource? traceSource, string message)
Parameters
traceSource
TraceSourceThe trace source.
message
stringThe message.
TraceError(TraceSource?, string, params object[])
Traces the error.
public static void TraceError(this TraceSource? traceSource, string format, params object[] args)
Parameters
traceSource
TraceSourceThe trace source.
format
stringThe format.
args
object[]The arguments.
TraceVerbose(TraceSource?, string)
Trace event type Verbose
public static void TraceVerbose(this TraceSource? traceSource, string message)
Parameters
traceSource
TraceSourceThe trace source.
message
stringThe message.
TraceVerbose(TraceSource?, string, params object[])
Trace event type Verbose
public static void TraceVerbose(this TraceSource? traceSource, string format, params object[] args)
Parameters
traceSource
TraceSourceThe trace source.
format
stringThe format.
args
object[]The arguments.
TraceWarning(TraceSource?, string)
Trace event type Warning
public static void TraceWarning(this TraceSource? traceSource, string message)
Parameters
traceSource
TraceSourceThe trace source.
message
stringThe message.
TraceWarning(TraceSource?, string, params object[])
Trace event type Warning
public static void TraceWarning(this TraceSource? traceSource, string format, params object[] args)
Parameters
traceSource
TraceSourceThe trace source.
format
stringThe format.
args
object[]The arguments.
WithSourceLevels(TraceSource?)
Returns the TraceSource with Switch Level All.
public static TraceSource? WithSourceLevels(this TraceSource? traceSource)
Parameters
traceSource
TraceSourceThe trace source.
Returns
WithSourceLevels(TraceSource?, SourceLevels)
Returns the TraceSource with the specified SourceLevels.
public static TraceSource? WithSourceLevels(this TraceSource? traceSource, SourceLevels levels)
Parameters
traceSource
TraceSourceThe trace source.
levels
SourceLevelsThe levels.
Returns
WriteLine(TraceSource?, string)
Trace event type Information
public static void WriteLine(this TraceSource? traceSource, string message)
Parameters
traceSource
TraceSourceThe trace source.
message
stringThe 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
traceSource
TraceSourceThe trace source.
format
stringThe format.
args
object[]The arguments.
Remarks
This member was previously marked with ObsoleteAttribute. For detail, see https://github.com/BryanWilhite/SonghayCore/issues/82#issuecomment-566214635