Defines an implementation of Logger that writes to standard Debug or Trace output.
Constructors
DebuggerLogger(string)
Initializes a new instance of the Debugger
Parameter | Type | Description |
---|---|---|
categoryName | string | The category name of the logger, or |
Methods
BeginScope(string?, params object?[])
Begins a new scope.
Parameter | Type | Description |
---|---|---|
messageFormat | string | |
args | object[] | The optional values to be used when formatting the scope message. |
Returns
- IDisposable:
An IDisposable that should be disposed to close the scope, or
null
if scopes are not supported by the logger.
DebugWriteLine(LogLevel, Exception?, string?)
Writes a line to debug output.
Parameter | Type | Description |
---|---|---|
logLevel | Log |
The log level. |
exception | Exception | The exception, if any, associated with the message. |
text | string | The line of text to be written. |
GetLogLevelDisplayText(LogLevel)
Gets the display text for the given log level.
Parameter | Type | Description |
---|---|---|
logLevel | Log |
The log level. |
Returns
- string:
A string of the display text to be used for the log level.
IsEnabled(LogLevel)
Gets if the given Log
Log(LogLevel, Func<string?>, Exception?)
Writes data to the logger with the given Log
Parameter | Type | Description |
---|---|---|
logLevel | Log |
The level of logging associated with the message. |
messageFactory | Func<string> | The function that is invoked to generate the message. |
exception | Exception | The Exception, if any, associated with the message. |
Inherited Members
-
Logger.
Begin Scope() -
Logger.
Log(Log Level, string, params object[]) -
Logger.
Log(Log Level, Exception, string, params object[]) - Logger.Log(LogLevel, Func<string>)
-
Logger.
Log Critical(Exception, string, params object[]) -
Logger.
Log Critical(string, params object[]) - Logger.LogCritical(Func<string>)
-
Logger.
Log Debug(Exception, string, params object[]) -
Logger.
Log Debug(string, params object[]) - Logger.LogDebug(Func<string>)
-
Logger.
Log Error(Exception, string, params object[]) -
Logger.
Log Error(string, params object[]) - Logger.LogError(Func<string>)
-
Logger.
Log Information(Exception, string, params object[]) -
Logger.
Log Information(string, params object[]) - Logger.LogInformation(Func<string>)
-
Logger.
Log Trace(Exception, string, params object[]) -
Logger.
Log Trace(string, params object[]) - Logger.LogTrace(Func<string>)
-
Logger.
Log Warning(Exception, string, params object[]) -
Logger.
Log Warning(string, params object[]) - Logger.LogWarning(Func<string>)
-
object.
Get Type() -
object.
Memberwise Clone() -
object.
To String() -
object.
Equals(object) -
object.
Equals(object, object) -
object.
Reference Equals(object, object) -
object.
Get Hash Code()