|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoggerChannel
Manipulation of a subsection (a channel) of Azureus' logging.
A logger channel is created or retrieve via 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 Logger.getNullChannel(String)
).
Field Summary | |
---|---|
static int |
LT_ERROR
Error Log Type |
static int |
LT_INFORMATION
Information Log Type |
static int |
LT_WARNING
Warning Log Type |
Method Summary | |
---|---|
void |
addListener(LoggerChannelListener l)
Add a LoggerChannelListener to this LoggerChannel |
boolean |
getForce()
|
Logger |
getLogger()
Retrieve the parent Logger object for this LoggerChannel. |
java.lang.String |
getName()
Returns the name of the Logger Channel |
boolean |
isEnabled()
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. |
void |
log(int log_type,
java.lang.String data)
Log a message of a specific type to this channel's logger |
void |
log(java.lang.Object[] relatedTo,
int log_type,
java.lang.String data)
Log a string against a list of objects |
void |
log(java.lang.Object[] relatedTo,
java.lang.String data)
Log an error against a list of objects with implicit type LT_INFORMATION |
void |
log(java.lang.Object[] relatedTo,
java.lang.String data,
java.lang.Throwable error)
Log an error against a list of objects |
void |
log(java.lang.Object relatedTo,
int log_type,
java.lang.String data)
Log an error against an object. |
void |
log(java.lang.Object relatedTo,
java.lang.String data)
Log an error against an object with implicit type LT_INFORMATION |
void |
log(java.lang.Object relatedTo,
java.lang.String data,
java.lang.Throwable error)
Log an error against an object. |
void |
log(java.lang.String data)
log text with implicit type LT_INFORMATION |
void |
log(java.lang.String data,
java.lang.Throwable error)
log an error with implicit type of LT_ERROR |
void |
log(java.lang.Throwable error)
log an error with implicit type of LT_ERROR |
void |
logAlert(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. |
void |
logAlert(java.lang.String message,
java.lang.Throwable e)
Alert the user of an error |
void |
logAlertRepeatable(int alert_type,
java.lang.String message)
Raise an alert to the user, if UI present. |
void |
logAlertRepeatable(java.lang.String message,
java.lang.Throwable e)
Raise an alert to the user, if UI present. |
void |
removeListener(LoggerChannelListener l)
Remove a reviously added LoggerChannelListener |
void |
setDiagnostic()
This causes the channel to also write to logs/name files in a cyclic fashion (c.f. |
void |
setDiagnostic(long max_file_size,
boolean timestamp)
|
void |
setForce(boolean force_to_file)
logging to file is disabled by default in non-beta builds. |
Field Detail |
---|
static final int LT_INFORMATION
static final int LT_WARNING
static final int LT_ERROR
Method Detail |
---|
java.lang.String getName()
boolean isEnabled()
void setDiagnostic()
void setDiagnostic(long max_file_size, boolean timestamp)
void setForce(boolean force_to_file)
force_to_file
- boolean getForce()
void log(int log_type, java.lang.String data)
log_type
- LT_* constantdata
- text to logvoid log(java.lang.String data)
LT_INFORMATION
data
- text to logvoid log(java.lang.Throwable error)
LT_ERROR
error
- Throwable object to logvoid log(java.lang.String data, java.lang.Throwable error)
LT_ERROR
data
- text to logerror
- Throwable object to logvoid log(java.lang.Object[] relatedTo, int log_type, java.lang.String data)
relatedTo
- a list of what this log is related to (ex. Peer, Torrent,
Download, Object)log_type
- LT_* constantdata
- text to logvoid log(java.lang.Object relatedTo, int log_type, java.lang.String data)
relatedTo
- What this log is related to (ex. Peer, Torrent,
Download, Object, etc)log_type
- LT_* constantdata
- text to logvoid log(java.lang.Object relatedTo, java.lang.String data, java.lang.Throwable error)
relatedTo
- What this log is related to (ex. Peer, Torrent,
Download, Object, etc)data
- text to logerror
- Error that will be appended to the log entryvoid log(java.lang.Object[] relatedTo, java.lang.String data, java.lang.Throwable error)
relatedTo
- a list of what this log is related to (ex. Peer, Torrent,
Download, Object)data
- text to logerror
- Error that will be appended to the log entryvoid log(java.lang.Object[] relatedTo, java.lang.String data)
LT_INFORMATION
relatedTo
- a list of what this log is related to (ex. Peer, Torrent,
Download, Object)data
- text to logvoid log(java.lang.Object relatedTo, java.lang.String data)
LT_INFORMATION
relatedTo
- What this log is related to (ex. Peer, Torrent,
Download, Object, etc)data
- text to logvoid logAlert(int alert_type, java.lang.String message)
alert_type
- LT_* constantmessage
- text to alert user withvoid logAlert(java.lang.String message, java.lang.Throwable e)
message
- text to alert user withe
- Error that will be attached to the alertvoid logAlertRepeatable(int alert_type, java.lang.String message)
alert_type
- LT_* constantmessage
- text to alert user withvoid logAlertRepeatable(java.lang.String message, java.lang.Throwable e)
message
- text to alert user withe
- Error that will be attached to the alertvoid addListener(LoggerChannelListener l)
l
- Listener to addvoid removeListener(LoggerChannelListener l)
l
- Listener to remove.Logger getLogger()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |