C# Класс ControlSystem.DatabaseLogger

Logs events to the database.
Наследование: ILogger
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
LogThreadFunction void
addItemToQueue void
createLog void

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

Метод Описание
DatabaseLogger ( string _threadName = "LogThread" ) : System

Default constructor.

log ( string _sMsg, eLogType _eltType ) : void

Main function to be called when logging to database is needed.

prepForShutdownApp ( ) : void

Makes the log thread finish up and stop, making sure all logs have been sent to database

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

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

Function which will be running in its own thread, continuesly adding logs to database

addItemToQueue ( Tuple _tubLog ) : void

Function which adds a tuple to the queue, but at the same time sends event to log thread that another has been added

createLog ( string _sLog, string _sMsg, System.DateTime _dTime ) : void

Private helping function to utilize database connection, query and execution

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

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

Default constructor.
public DatabaseLogger ( string _threadName = "LogThread" ) : System
_threadName string
Результат System

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

Main function to be called when logging to database is needed.
public log ( string _sMsg, eLogType _eltType ) : void
_sMsg string
_eltType eLogType Type of log
Результат void

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

Makes the log thread finish up and stop, making sure all logs have been sent to database
public prepForShutdownApp ( ) : void
Результат void