C# 클래스 VoidLib.Common.Logging

This class handles all logging done for OpenBot. From simple output, to writing to files, to logging exceptions and user messages. It is event based, and thread safe.
파일 보기 프로젝트 열기: andrewmunro/Void

Private Properties

프로퍼티 타입 설명
Events_OnBotShutdown void
InvokeOnDebug void
InvokeOnWrite void
Logging System
_WriteQueue void

공개 메소드들

메소드 설명
LogException ( Exception ex ) : void

Logs the specified exception into the log queue.

LogMessage ( string format ) : void

Logs the specified message to the logging queue. This will not fire any message events. It will go straight to the log file without question.

Write ( Color color, string format ) : void

Writes the specified message to the message queue.

Write ( string format ) : void

Writes the specified message to the message queue.

WriteDebug ( Color color, string format ) : void

Writes the debug message in the specific color. Debug messages are not shown to the end user by default. (They can be turned on via settings)

WriteDebug ( string format ) : void

Writes the specified debug message to the message queue. [Default Color: Red] Debug messages are not shown to the end user by default. (They can be turned on via settings)

WriteException ( Color color, Exception ex ) : void

Writes the specified exception to the message queue. Debug messages are not shown to the end user by default. (They can be turned on via settings)

WriteException ( Exception ex ) : void

Writes the specified exception to the message queue. [Default Color: Red] Debug messages are not shown to the end user by default. (They can be turned on via settings)

비공개 메소드들

메소드 설명
Events_OnBotShutdown ( object sender, EventArgs e ) : void
InvokeOnDebug ( string message, Color col ) : void
InvokeOnWrite ( string message, Color col ) : void
Logging ( ) : System
_WriteQueue ( object blocking ) : void

메소드 상세

LogException() 공개 정적인 메소드

Logs the specified exception into the log queue.
public static LogException ( Exception ex ) : void
ex System.Exception The exception to be logged.
리턴 void

LogMessage() 공개 정적인 메소드

Logs the specified message to the logging queue. This will not fire any message events. It will go straight to the log file without question.
public static LogMessage ( string format ) : void
format string The format param of string.Format
리턴 void

Write() 공개 정적인 메소드

Writes the specified message to the message queue.
public static Write ( Color color, string format ) : void
color Color The color to write the message in.
format string The format.
리턴 void

Write() 공개 정적인 메소드

Writes the specified message to the message queue.
public static Write ( string format ) : void
format string The format.
리턴 void

WriteDebug() 공개 정적인 메소드

Writes the debug message in the specific color. Debug messages are not shown to the end user by default. (They can be turned on via settings)
public static WriteDebug ( Color color, string format ) : void
color Color The color to write in.
format string
리턴 void

WriteDebug() 공개 정적인 메소드

Writes the specified debug message to the message queue. [Default Color: Red] Debug messages are not shown to the end user by default. (They can be turned on via settings)
public static WriteDebug ( string format ) : void
format string The format.
리턴 void

WriteException() 공개 정적인 메소드

Writes the specified exception to the message queue. Debug messages are not shown to the end user by default. (They can be turned on via settings)
public static WriteException ( Color color, Exception ex ) : void
color Color The color to write the message in.
ex System.Exception The exception that will be logged.
리턴 void

WriteException() 공개 정적인 메소드

Writes the specified exception to the message queue. [Default Color: Red] Debug messages are not shown to the end user by default. (They can be turned on via settings)
public static WriteException ( Exception ex ) : void
ex System.Exception The exception that will be logged.
리턴 void