C# Class SteamChatBot.Log

Inheritance: IDisposable
Exibir arquivo Open project: Steam-Chat-Bot/SteamChatBot

Public Properties

Property Type Description
DefaultConsoleColor ConsoleColor
FileLogLevel LogLevel
OutputLevel LogLevel

Protected Properties

Property Type Description
_FileStream System.IO.StreamWriter
_botName string

Public Methods

Method Description
CreateInstance ( string logFile, string botName, LogLevel consoleLogLevel, LogLevel fileLogLevel ) : Log
Debug ( string data ) : void
Dispose ( ) : void
Error ( string data ) : void
Info ( string data ) : void
Silly ( string data ) : void
Verbose ( string data ) : void
Warn ( string data ) : void
Write ( string data ) : void

Protected Methods

Method Description
_LogColor ( LogLevel level ) : ConsoleColor
_LogLevel ( LogLevel level ) : string
_OutputLine ( LogLevel level, string line ) : void
_OutputLineToConsole ( LogLevel level, string line ) : void

Private Methods

Method Description
Dispose ( bool disposing ) : void
GetLogBotName ( ) : string
Log ( string logFile, string botName = "", LogLevel consoleLogLevel = LogLevel.Info, LogLevel fileLogLevel = LogLevel.Info ) : System

Method Details

CreateInstance() public static method

public static CreateInstance ( string logFile, string botName, LogLevel consoleLogLevel, LogLevel fileLogLevel ) : Log
logFile string
botName string
consoleLogLevel LogLevel
fileLogLevel LogLevel
return Log

Debug() public method

public Debug ( string data ) : void
data string
return void

Dispose() public method

public Dispose ( ) : void
return void

Error() public method

public Error ( string data ) : void
data string
return void

Info() public method

public Info ( string data ) : void
data string
return void

Silly() public method

public Silly ( string data ) : void
data string
return void

Verbose() public method

public Verbose ( string data ) : void
data string
return void

Warn() public method

public Warn ( string data ) : void
data string
return void

Write() public static method

public static Write ( string data ) : void
data string
return void

_LogColor() protected method

protected _LogColor ( LogLevel level ) : ConsoleColor
level LogLevel
return ConsoleColor

_LogLevel() protected method

protected _LogLevel ( LogLevel level ) : string
level LogLevel
return string

_OutputLine() protected method

protected _OutputLine ( LogLevel level, string line ) : void
level LogLevel
line string
return void

_OutputLineToConsole() protected method

protected _OutputLineToConsole ( LogLevel level, string line ) : void
level LogLevel
line string
return void

Property Details

DefaultConsoleColor public_oe property

public ConsoleColor DefaultConsoleColor
return ConsoleColor

FileLogLevel public_oe property

public LogLevel FileLogLevel
return LogLevel

OutputLevel public_oe property

public LogLevel OutputLevel
return LogLevel

_FileStream protected_oe property

protected StreamWriter,System.IO _FileStream
return System.IO.StreamWriter

_botName protected_oe property

protected string _botName
return string