C# Class csShared.Utils.Logger

显示文件 Open project: TNOCS/csTouch

Public Methods

Method Description
GetInstance ( ) : Logger
Log ( string source, string message, string content, Level level, bool showInGUI = false, bool showInEventLog = false ) : void

When logging a message, you can also show it in the GUI by setting showInGUI=true.

StartWork ( ) : void
Stat ( string key, int count = 1 ) : void
StopWork ( ) : void

Private Methods

Method Description
BwDoWork ( object sender, DoWorkEventArgs e ) : void
BwstatDoWork ( object sender, DoWorkEventArgs e ) : void
ConvertToEventState ( Level level ) : EventState
ConvertToImageUri ( Level level ) : string
GetWriter ( ) : StreamWriter
Logger ( ) : System
SendData ( ) : void

Method Details

GetInstance() public static method

public static GetInstance ( ) : Logger
return Logger

Log() public static method

When logging a message, you can also show it in the GUI by setting showInGUI=true.
public static Log ( string source, string message, string content, Level level, bool showInGUI = false, bool showInEventLog = false ) : void
source string
message string
content string
level Level
showInGUI bool
showInEventLog bool
return void

StartWork() public method

public StartWork ( ) : void
return void

Stat() public static method

public static Stat ( string key, int count = 1 ) : void
key string
count int
return void

StopWork() public method

public StopWork ( ) : void
return void