StreamLink.NET
8.0.3-8.0.3-1239-180a512
|
Allows StreamLink log messages to be written to the destination of your choice. More...
Public Member Functions | |
void | AddListener (Caplin.StreamLink.ILogListener listener, Caplin.StreamLink.LogLevel level) |
Adds a ILogListener to this Logger. The listener is More... | |
void | Log (Caplin.StreamLink.LogLevel level, string message, params object[] args) |
Sends a log message to all ILogListener's that have More... | |
void | RemoveListener (Caplin.StreamLink.ILogListener listener) |
Removes a ILogListener that you previously added (see addListener). More... | |
Allows StreamLink log messages to be written to the destination of your choice.
You obtain an instance of caplin.streamlink.Logger by calling streamLinkInstance.getLogger() on the StreamLink instance.
StreamLinkJS only: When suitably configured (by adding ?debug=finer to your url), StreamLink's log messages are automatically written to a dedicated window (the StreamLink Console). You would normally only enable this facility for debug purposes. You can call the Logger.log() method to write your own log messages to the StreamLink Console.
You can use caplin.streamlink.Logger to write StreamLink's log messages to some other destination, such as a window that also contains log messages originating from your application. To do this, implement a ILogListener that receives the StreamLink messages and logs them to the required destination. Then obtain an instance of ILogger, and call addListener() to attach your Log Listener to this instance. For a code example showing this, see ILogListener.
void Caplin.StreamLink.ILogger.AddListener | ( | Caplin.StreamLink.ILogListener | listener, |
Caplin.StreamLink.LogLevel | level | ||
) |
Adds a ILogListener to this Logger. The listener is
** called whenever a StreamLink message with the defined LogLevel is to be logged.
listener | The object that implements the ILogListener Interface. |
level | The LogLevel of log messages for which the listener is to be called. Only messages at or above this log level will invoke this listener. |
void Caplin.StreamLink.ILogger.Log | ( | Caplin.StreamLink.LogLevel | level, |
string | message, | ||
params object[] | args | ||
) |
Sends a log message to all ILogListener's that have
level | The logging level that will be associated with the logged message. |
message | The message to log. |
args | Arguments included in the log message. |
void Caplin.StreamLink.ILogger.RemoveListener | ( | Caplin.StreamLink.ILogListener | listener | ) |
Removes a ILogListener that you previously added (see addListener).
listener | The ILogListener you added. |