C# Class IrcShark.Logger

The Logger class is the entrypoint to the logging system of IrcShark.
Logging a message is quite easy: simply call the Log method with the give IrcShark.LogMessage. The message is then send to all log writers by fireing the LoggedMessage event.
Inheritance: IDisposable
Mostrar archivo Open project: hapm/IrcShark

Public Methods

Method Description
Debug ( string channel, int id, string message ) : void

Logs a debug message to the given channel.

Dispose ( ) : void

Disposes the Logger instance.

Error ( string channel, int id, string message ) : void

Logs an error message to the given channel.

Info ( string channel, int id, string message ) : void

Logs an info message to the given channel.

Log ( LogMessage msg ) : void

Logs a new message to the logging system.

Logger ( IrcSharkApplication app ) : System

Initializes a new instance of the Logger class.

Warning ( string channel, int id, string message ) : void

Logs a warning message to the given channel.

Protected Methods

Method Description
Dispose ( bool disposed ) : void

Disposes the Logger instance.

Private Methods

Method Description
MessageWatcher ( ) : void

Method called of logThread.

Method Details

Debug() public method

Logs a debug message to the given channel.
public Debug ( string channel, int id, string message ) : void
channel string The channel to log to.
id int The id of the message to log.
message string The text message to log.
return void

Dispose() public method

Disposes the Logger instance.
public Dispose ( ) : void
return void

Dispose() protected method

Disposes the Logger instance.
protected Dispose ( bool disposed ) : void
disposed bool If true, the managed resources are disposed too.
return void

Error() public method

Logs an error message to the given channel.
public Error ( string channel, int id, string message ) : void
channel string The channel to log to.
id int The id of the message to log.
message string The text message to log.
return void

Info() public method

Logs an info message to the given channel.
public Info ( string channel, int id, string message ) : void
channel string The channel to log to.
id int The id of the message to log.
message string The text message to log.
return void

Log() public method

Logs a new message to the logging system.
public Log ( LogMessage msg ) : void
msg LogMessage /// The to log. ///
return void

Logger() public method

Initializes a new instance of the Logger class.
public Logger ( IrcSharkApplication app ) : System
app IrcSharkApplication /// The , this Logger logs messages for. ///
return System

Warning() public method

Logs a warning message to the given channel.
public Warning ( string channel, int id, string message ) : void
channel string The channel to log to.
id int The id of the message to log.
message string The text message to log.
return void