C# Class TShockAPI.TextLog

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

Méthodes publiques

Méthode 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 méthode

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

ConsoleInfo() public méthode

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.
Résultat void

Data() public méthode

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

Debug() public méthode

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

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Error() public méthode

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

Info() public méthode

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

MayWriteType() public méthode

public MayWriteType ( TraceLevel type ) : bool
type TraceLevel
Résultat bool

TextLog() public méthode

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.
Résultat System

Warn() public méthode

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

Write() public méthode

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