FileDocCategorySizeDatePackage
LoggerChannel.javaAPI DocAzureus 3.0.3.46848Sat Nov 18 15:27:02 GMT 2006org.gudy.azureus2.plugins.logging

LoggerChannel

public interface LoggerChannel
Manipulation of a subsection (a channel) of Azureus' logging. A logger channel is created or retrieve via {@link Logger}. Typically, a plugin has it's own channel which it can manipulate. All channels are part of Azureus logging as a whole, meaning anything logged here will also be fed to any functionality that operates on logging data (with the exception of {@link Logger#getNullChannel(String)}).
since
2.0.7.0

Fields Summary
public static final int
LT_INFORMATION
Information Log Type
public static final int
LT_WARNING
Warning Log Type
public static final int
LT_ERROR
Error Log Type
Constructors Summary
Methods Summary
public voidaddListener(LoggerChannelListener l)
Add a LoggerChannelListener to this LoggerChannel

param
l Listener to add
since
2.0.8.0

public LoggergetLogger()
Retrieve the parent Logger object for this LoggerChannel.

return
Logger object
since
2.3.0.0

public java.lang.StringgetName()
Returns the name of the Logger Channel

return
Logger channel name
since
2.0.7.0

public booleanisEnabled()
Indicates whether or not logging is enabled - use to optimise calls to the log methods that require resources to construct the message to be logged. Note that this doesn't apply to alerts - these will always be handled

return
Enabled state of logging
since
2.3.0.2

public voidlog(java.lang.Object relatedTo, java.lang.String data, java.lang.Throwable error)
Log an error against an object.

param
relatedTo What this log is related to (ex. Peer, Torrent, Download, Object, etc)
param
data text to log
param
error Error that will be appended to the log entry
since
2.3.0.7

public voidlog(java.lang.Object[] relatedTo, java.lang.String data, java.lang.Throwable error)
Log an error against a list of objects

param
relatedTo a list of what this log is related to (ex. Peer, Torrent, Download, Object)
param
data text to log
param
error Error that will be appended to the log entry
since
2.3.0.7

public voidlog(java.lang.Object[] relatedTo, java.lang.String data)
Log an error against a list of objects with implicit type {@link #LT_INFORMATION}

param
relatedTo a list of what this log is related to (ex. Peer, Torrent, Download, Object)
param
data text to log
since
2.5.0.1

public voidlog(java.lang.Object relatedTo, java.lang.String data)
Log an error against an object with implicit type {@link #LT_INFORMATION}

param
relatedTo What this log is related to (ex. Peer, Torrent, Download, Object, etc)
param
data text to log
since
2.5.0.1

public voidlog(int log_type, java.lang.String data)
Log a message of a specific type to this channel's logger

param
log_type LT_* constant
param
data text to log
since
2.0.7.0

public voidlog(java.lang.String data)
log text with implicit type {@link #LT_INFORMATION}

param
data text to log
since
2.1.0.0

public voidlog(java.lang.Throwable error)
log an error with implicit type of {@link #LT_ERROR}

param
error Throwable object to log
since
2.0.7.0

public voidlog(java.lang.String data, java.lang.Throwable error)
log an error with implicit type of {@link #LT_ERROR}

param
data text to log
param
error Throwable object to log
since
2.0.7.0

public voidlog(java.lang.Object[] relatedTo, int log_type, java.lang.String data)
Log a string against a list of objects

param
relatedTo a list of what this log is related to (ex. Peer, Torrent, Download, Object)
param
log_type LT_* constant
param
data text to log
since
2.3.0.7

public voidlog(java.lang.Object relatedTo, int log_type, java.lang.String data)
Log an error against an object.

param
relatedTo What this log is related to (ex. Peer, Torrent, Download, Object, etc)
param
log_type LT_* constant
param
data text to log
since
2.3.0.7

public voidlogAlert(int alert_type, java.lang.String message)
raise an alert to the user, if UI present Note that messages shown to the user are filtered on unique message content So if you raise an identical alert the second + subsequent messages will not be shown. Thus, if you want "identical" messages to be shown, prefix them with something unique like a timestamp.

param
alert_type LT_* constant
param
message text to alert user with
since
2.0.8.0

public voidlogAlert(java.lang.String message, java.lang.Throwable e)
Alert the user of an error

param
message text to alert user with
param
e Error that will be attached to the alert
since
2.1.0.2

public voidlogAlertRepeatable(int alert_type, java.lang.String message)
Raise an alert to the user, if UI present. Subsequent, identical messages will always generate an alert (i.e. duplicates won't be filtered)

param
alert_type LT_* constant
param
message text to alert user with
since
2.1.0.2

public voidlogAlertRepeatable(java.lang.String message, java.lang.Throwable e)
Raise an alert to the user, if UI present. Subsequent, identical messages will always generate an alert (i.e. duplicates won't be filtered)

param
message text to alert user with
param
e Error that will be attached to the alert
since
2.1.0.2

public voidremoveListener(LoggerChannelListener l)
Remove a reviously added LoggerChannelListener

param
l Listener to remove.
since
2.0.8.0

public voidsetDiagnostic()
This causes the channel to also write to logs/name files in a cyclic fashion (c.f. the debug_1/2._log files)

since
2.4.0.2