C# Class ARCed.Core.Logger

Class for creating a buffer and adding text to. Acts as a loose wrapper for a StringBuilder object, but includes events raised when text is added or when the buffer is flushed to a file.
Show file Open project: borisblizzard/arcreator

Public Methods

Method Description
Append ( object obj ) : void

Appends the string representation of the object to the log

Append ( string text ) : void

Appends the text to the log

AppendFormat ( string text ) : void

Appends text, replacing items in formatted string with objects

AppendHeader ( string message ) : void

Appends a header to the log file to denote a new section

AppendLine ( object obj ) : void

Appends the string representation of the object to the log and adds a newline

AppendLine ( string text ) : void

Appends the text to the log and adds a newline

Clear ( bool notify = false ) : void

Clears the buffer of all logged text

Logger ( ) : System

Default contructor

Save ( string filename, bool flushBuffer ) : void

Saves the log file to disk

Private Methods

Method Description
LogConsole ( object obj ) : void
LogConsoleLine ( object obj ) : void

Method Details

Append() public method

Appends the string representation of the object to the log
public Append ( object obj ) : void
obj object Object to append
return void

Append() public method

Appends the text to the log
public Append ( string text ) : void
text string Text to append
return void

AppendFormat() public method

Appends text, replacing items in formatted string with objects
public AppendFormat ( string text ) : void
text string Format string
return void

AppendHeader() public method

Appends a header to the log file to denote a new section
public AppendHeader ( string message ) : void
message string The text within the header
return void

AppendLine() public method

Appends the string representation of the object to the log and adds a newline
public AppendLine ( object obj ) : void
obj object Object to append
return void

AppendLine() public method

Appends the text to the log and adds a newline
public AppendLine ( string text ) : void
text string Text to append
return void

Clear() public method

Clears the buffer of all logged text
public Clear ( bool notify = false ) : void
notify bool Flag to fire NoteTextChanged event
return void

Logger() public method

Default contructor
public Logger ( ) : System
return System

Save() public method

Saves the log file to disk
public Save ( string filename, bool flushBuffer ) : void
filename string FullPath where log is saved
flushBuffer bool Flag to clear the buffer after saving
return void