C# Class TShockAPI.TextLog

Class inheriting ILog for writing logs to a text file
Inheritance: ILog, IDisposable
Datei anzeigen Open project: NyxStudios/TShock Class Usage Examples

Public Methods

Method Description
ConsoleError ( string message ) : void

Writes an error to the log file.

ConsoleInfo ( string message ) : void

Writes an informative string to the log file. Also outputs to the console.

Data ( string message ) : void

Writes data to the log file.

Debug ( string message ) : void

Writes a debug string to the log file.

Dispose ( ) : void
Error ( string message ) : void

Writes an error to the log file.

Info ( string message ) : void

Writes an informative string to the log file.

MayWriteType ( TraceLevel type ) : bool
TextLog ( string filename, bool clear ) : System

Creates the log file stream and sets the initial log level.

Warn ( string message ) : void

Writes a warning to the log file.

Write ( string message, TraceLevel level ) : void

Writes a message to the log

Method Details

ConsoleError() public method

Writes an error to the log file.
public ConsoleError ( string message ) : void
message string The message to be written.
return void

ConsoleInfo() public method

Writes an informative string to the log file. Also outputs to the console.
public ConsoleInfo ( string message ) : void
message string The message to be written.
return void

Data() public method

Writes data to the log file.
public Data ( string message ) : void
message string The message to be written.
return void

Debug() public method

Writes a debug string to the log file.
public Debug ( string message ) : void
message string The message to be written.
return void

Dispose() public method

public Dispose ( ) : void
return void

Error() public method

Writes an error to the log file.
public Error ( string message ) : void
message string The message to be written.
return void

Info() public method

Writes an informative string to the log file.
public Info ( string message ) : void
message string The message to be written.
return void

MayWriteType() public method

public MayWriteType ( TraceLevel type ) : bool
type TraceLevel
return bool

TextLog() public method

Creates the log file stream and sets the initial log level.
public TextLog ( string filename, bool clear ) : System
filename string The output filename. This file will be overwritten if 'clear' is set.
clear bool Whether or not to clear the log file on initialization.
return System

Warn() public method

Writes a warning to the log file.
public Warn ( string message ) : void
message string The message to be written.
return void

Write() public method

Writes a message to the log
public Write ( string message, TraceLevel level ) : void
message string
level TraceLevel
return void