public interface LogListener
Interface for receiving log messages from the StreamLink application.
If you wish to capture StreamLink's log messages (for example, to write them to your own log window),
implement this interface, create an instance of it, and attach it to an instance of
Logger
.
The following code example shows a simple anonymous implementation of LogListener
import com.caplin.streamlink.StreamLink;
import com.caplin.streamlink.LogInfo;
import com.caplin.streamlink.LogLevel;
import com.caplin.streamlink.LogListener;
public class LogListenerSnippet {
public LogListenerSnippet(StreamLink streamLink) {
streamLink.getLogger().addListener(new LogListener() {
public void onLog(LogInfo logInfo) {
System.out.println(logInfo.getMessage());
}
}, LogLevel.FINEST);
}
}
void onLog(LogInfo logInfo)
Called when a StreamLink log message is to be logged.
logInfo
- The LogInfo object, containing the log message text and log level.Please send bug reports and comments to Caplin support