C# Класс Skytap.Utilities.Logger

Base class for all loggers. Provides the interface that all loggers must satisfy.
The Logger class and set of Logger subclasses basically implement a Strategy design pattern.
Наследование: IDisposable
Показать файл Открыть проект

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

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

Call when logging is complete to clean up any resources (like a file handle).

Flush ( ) : void

Flushes the contents of the log to ensure, in the case of writing to disk, that all content is written appropriately. Not all subclasses override this.

LogError ( string message ) : void

Logs any errors to the log file provided filter levels allow for it.

LogImportant ( string message ) : void

Logs the equivalent of a warning provided filter levels allow for it.

LogInfo ( string message ) : void

Logs informational messages provided filtering allows for it.

Reset ( ) : void

Reset the log file and start over. Not all subclasses will implement this.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Does the real work of Dispose - cleaning up any resources owned by the logger. This class should be overridden in a subclass to provide real functionality.

Logger ( ) : System

Default constructor for Logger. This constructor is protected due to the class being abstract.

_LogError ( string message ) : void

Implemented by subclass. Called by this base class to have a subclass do the real work of the logging. This technique follows the strategy pattern.

_LogImportant ( string message ) : void

Implemented by subclass. Called by this base class to have a subclass do the real work of the logging. This technique follows the strategy pattern.

_LogInfo ( string message ) : void

Implemented by subclass. Called by this base class to have a subclass do the real work of the logging. This technique follows the strategy pattern.

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

Метод Описание
GetMessagePrefix ( ) : string

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

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

Call when logging is complete to clean up any resources (like a file handle).
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Does the real work of Dispose - cleaning up any resources owned by the logger. This class should be overridden in a subclass to provide real functionality.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

Flushes the contents of the log to ensure, in the case of writing to disk, that all content is written appropriately. Not all subclasses override this.
public Flush ( ) : void
Результат void

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

Logs any errors to the log file provided filter levels allow for it.
public LogError ( string message ) : void
message string Message to input to the log; can be formatted using FormatString /// parameters.
Результат void

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

Logs the equivalent of a warning provided filter levels allow for it.
public LogImportant ( string message ) : void
message string Message to input to the log; can be formatted using FormatString /// parameters.
Результат void

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

Logs informational messages provided filtering allows for it.
public LogInfo ( string message ) : void
message string Message to input to the log; can be formatted using FormatString /// parameters.
Результат void

Logger() защищенный Метод

Default constructor for Logger. This constructor is protected due to the class being abstract.
protected Logger ( ) : System
Результат System

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

Reset the log file and start over. Not all subclasses will implement this.
public Reset ( ) : void
Результат void

_LogError() защищенный абстрактный Метод

Implemented by subclass. Called by this base class to have a subclass do the real work of the logging. This technique follows the strategy pattern.
protected abstract _LogError ( string message ) : void
message string Message to log.
Результат void

_LogImportant() защищенный абстрактный Метод

Implemented by subclass. Called by this base class to have a subclass do the real work of the logging. This technique follows the strategy pattern.
protected abstract _LogImportant ( string message ) : void
message string Message to log.
Результат void

_LogInfo() защищенный абстрактный Метод

Implemented by subclass. Called by this base class to have a subclass do the real work of the logging. This technique follows the strategy pattern.
protected abstract _LogInfo ( string message ) : void
message string Message to log.
Результат void