C# 클래스 ControlSystem.DatabaseLogger

Logs events to the database.
상속: ILogger
파일 보기 프로젝트 열기: syre/SortingIndustrialRobot 1 사용 예제들

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