C# Класс Mycroft.Logger

Log messages to log files by default logs are in the log folder, and labeled by day. Log messages are automatically time stamped
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
WriteLock object

Открытые методы

Метод Описание
Close ( ) : bool

Close the underlying connection write stream.

Debug ( string message ) : bool

Log a debug-level message

Error ( string message ) : bool

Log an error-level message

GetInstance ( ) : Logger
Info ( string message ) : bool

Log an info-level message

WTF ( string message ) : bool

Log a WTF-level message

Warning ( string message ) : bool

Log a warning-level message

Приватные методы

Метод Описание
CheckFile ( ) : void

Checks file to confirm correct log file.

GetColor ( Level level ) : ConsoleColor

Get the console color associated with this log level

Log ( Level level, string message ) : bool

Log given message. Example of a log message: [2008-04-10 13:30:00Z] WARNING: this is the message

Logger ( ) : System

Описание методов

Close() публичный Метод

Close the underlying connection write stream.
public Close ( ) : bool
Результат bool

Debug() публичный Метод

Log a debug-level message
public Debug ( string message ) : bool
message string the message to log
Результат bool

Error() публичный Метод

Log an error-level message
public Error ( string message ) : bool
message string the message to log
Результат bool

GetInstance() публичный статический Метод

public static GetInstance ( ) : Logger
Результат Logger

Info() публичный Метод

Log an info-level message
public Info ( string message ) : bool
message string the message to log
Результат bool

WTF() публичный Метод

Log a WTF-level message
public WTF ( string message ) : bool
message string the message to log
Результат bool

Warning() публичный Метод

Log a warning-level message
public Warning ( string message ) : bool
message string the message to log
Результат bool

Описание свойств

WriteLock публичное свойство

A lock to ensure only one write to the stream can happen at once
public object WriteLock
Результат object