1. ConsoleLogger

Class ConsoleLogger

A simple console logger that can print with or without a built-in template.

The template is: "DateTime | LogLevel | Message".

The minimum log level is info by default.

Inheritance
object
ConsoleLogger
Implements
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsLogging
Assembly: Stylelabs.M.Sdk.dll
Syntax
public class ConsoleLogger : LoggerBase, ILogger

Properties

UseTemplate

Gets or sets a value indicating whether enables or disables logging using a template.

Declaration
public bool UseTemplate { get; set; }
Property Value
TypeDescription
bool

Methods

LogDebug(string)

Logs debug-level information.

Declaration
protected override void LogDebug(string message)
Parameters
TypeNameDescription
stringmessage

The message to log.

Overrides

LogError(Exception)

Logs error-level information.

Declaration
protected override void LogError(Exception exception)
Parameters
TypeNameDescription
Exceptionexception

The exception to log.

Overrides

LogError(string, Exception)

Logs error-level information.

Declaration
protected override void LogError(string message, Exception exception)
Parameters
TypeNameDescription
stringmessage

The message to log.

Exceptionexception

The exception to log.

Overrides

LogInfo(string)

Logs info-level information.

Declaration
protected override void LogInfo(string message)
Parameters
TypeNameDescription
stringmessage

The message to log.

Overrides

LogWarn(string)

Logs warning-level information.

Declaration
protected override void LogWarn(string message)
Parameters
TypeNameDescription
stringmessage

The message to log.

Overrides

Implements

If you have suggestions for improving this article, let us know!