Class ConsoleLogger
Represents a Console implementation of ILogger
.
Inherited Members
Namespace: Swan.Logging
Syntax
public class ConsoleLogger : TextLogger, ILogger, IDisposable
Constructors
ConsoleLogger()
Initializes a new instance of the ConsoleLogger class.
Declaration
protected ConsoleLogger()
Properties
DebugColor
Gets or sets the color of the debug output logging.
Declaration
public static ConsoleColor DebugColor { get; set; }
Property Value
Type | Description |
---|---|
ConsoleColor | The color of the debug. |
DebugPrefix
Gets or sets the debug logging prefix.
Declaration
public static string DebugPrefix { get; set; }
Property Value
Type | Description |
---|---|
String | The debug prefix. |
ErrorColor
Gets or sets the color of the error logging.
Declaration
public static ConsoleColor ErrorColor { get; set; }
Property Value
Type | Description |
---|---|
ConsoleColor | The color of the error. |
ErrorPrefix
Gets or sets the error logging prefix.
Declaration
public static string ErrorPrefix { get; set; }
Property Value
Type | Description |
---|---|
String | The error prefix. |
FatalColor
Gets or sets the color of the error logging.
Declaration
public static ConsoleColor FatalColor { get; set; }
Property Value
Type | Description |
---|---|
ConsoleColor | The color of the error. |
FatalPrefix
Gets or sets the fatal logging prefix.
Declaration
public static string FatalPrefix { get; set; }
Property Value
Type | Description |
---|---|
String | The fatal prefix. |
InfoColor
Gets or sets the color of the information output logging.
Declaration
public static ConsoleColor InfoColor { get; set; }
Property Value
Type | Description |
---|---|
ConsoleColor | The color of the information. |
InfoPrefix
Gets or sets the information logging prefix.
Declaration
public static string InfoPrefix { get; set; }
Property Value
Type | Description |
---|---|
String | The information prefix. |
Instance
Gets the current instance of ConsoleLogger.
Declaration
public static ConsoleLogger Instance { get; }
Property Value
Type | Description |
---|---|
ConsoleLogger | The instance. |
LogLevel
Gets the log level.
Declaration
public LogLevel LogLevel { get; set; }
Property Value
Type | Description |
---|---|
LogLevel | The log level. |
TraceColor
Gets or sets the color of the trace output logging.
Declaration
public static ConsoleColor TraceColor { get; set; }
Property Value
Type | Description |
---|---|
ConsoleColor | The color of the trace. |
TracePrefix
Gets or sets the trace logging prefix.
Declaration
public static string TracePrefix { get; set; }
Property Value
Type | Description |
---|---|
String | The trace prefix. |
WarnColor
Gets or sets the color of the warning logging.
Declaration
public static ConsoleColor WarnColor { get; set; }
Property Value
Type | Description |
---|---|
ConsoleColor | The color of the warn. |
WarnPrefix
Gets or sets the warning logging prefix.
Declaration
public static string WarnPrefix { get; set; }
Property Value
Type | Description |
---|---|
String | The warn prefix. |
Methods
Dispose()
Declaration
public void Dispose()
Log(LogMessageReceivedEventArgs)
Logs the specified log event.
Declaration
public void Log(LogMessageReceivedEventArgs logEvent)
Parameters
Type | Name | Description |
---|---|---|
LogMessageReceivedEventArgs | logEvent | The LogMessageReceivedEventArgs instance containing the event data. |