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

Logs information using event listeners and built in System.Diagnostics.Trace functionality.
Наследование: Logger
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
InitializeLogFile void

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

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

Write out the contents of the log string to the file, flushing the contents of the in-memory string.

Reset ( ) : void

Resets the log file by flushing the Trace, closing any files, and creating a new log filename.

This method will likely not be frequently used outside of tests, but is provided to start a new session without closing down the instance.

TraceLogger ( ) : System

Constructor for TraceLogger class.

TraceLogger ( TraceListener listener ) : System

Constructor for TraceLogger class.

This constructor allows for overriding the default type of TraceListener. This can be useful for test purposes when a log file need not be generated.

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

Метод Описание
Dispose ( bool disposing ) : void
_LogError ( string message ) : void
_LogImportant ( string message ) : void
_LogInfo ( string message ) : void

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

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

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

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

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

Write out the contents of the log string to the file, flushing the contents of the in-memory string.
public Flush ( ) : void
Результат void

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

Resets the log file by flushing the Trace, closing any files, and creating a new log filename.
This method will likely not be frequently used outside of tests, but is provided to start a new session without closing down the instance.
public Reset ( ) : void
Результат void

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

Constructor for TraceLogger class.
public TraceLogger ( ) : System
Результат System

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

Constructor for TraceLogger class.
This constructor allows for overriding the default type of TraceListener. This can be useful for test purposes when a log file need not be generated.
public TraceLogger ( TraceListener listener ) : System
listener System.Diagnostics.TraceListener
Результат System

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

protected _LogError ( string message ) : void
message string
Результат void

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

protected _LogImportant ( string message ) : void
message string
Результат void

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

protected _LogInfo ( string message ) : void
message string
Результат void