C# Class HourBoostr.Log

Show file Open project: Ezzpify/HourBoostr

Public Properties

Property Type Description
mLogName string

Public Methods

Method Description
Log ( string logName, string logPath, int queueSize ) : System

Class constructor Initializes the log file

Write ( LogLevel level, string str, bool logToFile = true, bool writeToConsole = true, bool rawMessage = false ) : void

Writes a log message

Private Methods

Method Description
FlushLog ( ) : void

Flushes the log to file

GetTimestamp ( ) : string

Returns a datetime timestmap

Method Details

Log() public method

Class constructor Initializes the log file
public Log ( string logName, string logPath, int queueSize ) : System
logName string Log name to easier recognize which log is speaking
logPath string Path to log file
queueSize int How many log entries we keep before flushing file
return System

Write() public method

Writes a log message
public Write ( LogLevel level, string str, bool logToFile = true, bool writeToConsole = true, bool rawMessage = false ) : void
level LogLevel Level of message
str string String to write
logToFile bool If we should write message to log file
writeToConsole bool
rawMessage bool
return void

Property Details

mLogName public property

Name of the log file
public string mLogName
return string