|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.logging.LoggerChannelImpl
public class LoggerChannelImpl
Field Summary |
---|
Fields inherited from interface org.gudy.azureus2.plugins.logging.LoggerChannel |
---|
LT_ERROR, LT_INFORMATION, LT_WARNING |
Constructor Summary | |
---|---|
protected |
LoggerChannelImpl(Logger _logger,
java.lang.String _name,
boolean _timestamp,
boolean _no_output)
|
Method Summary | |
---|---|
void |
addListener(LoggerChannelListener l)
Add a LoggerChannelListener to this LoggerChannel |
protected java.lang.String |
addTimeStamp(java.lang.String data)
|
boolean |
getForce()
|
Logger |
getLogger()
Retrieve the parent Logger object for this LoggerChannel. |
java.lang.String |
getName()
Returns the name of the Logger Channel |
protected java.lang.String |
getTimeStamp()
|
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 LoggerChannel.LT_INFORMATION |
void |
log(java.lang.Object[] relatedTo,
java.lang.String str,
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 LoggerChannel.LT_INFORMATION |
void |
log(java.lang.Object relatedTo,
java.lang.String str,
java.lang.Throwable error)
Log an error against an object. |
void |
log(java.lang.String data)
log text with implicit type LoggerChannel.LT_INFORMATION |
void |
log(java.lang.String str,
java.lang.Throwable error)
log an error with implicit type of LoggerChannel.LT_ERROR |
void |
log(java.lang.Throwable error)
log an error with implicit type of LoggerChannel.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. |
protected void |
logAlert(int alert_type,
java.lang.String message,
boolean repeatable)
|
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 diag_timestamp)
|
void |
setForce(boolean forceToFile)
logging to file is disabled by default in non-beta builds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected LoggerChannelImpl(Logger _logger, java.lang.String _name, boolean _timestamp, boolean _no_output)
Method Detail |
---|
public Logger getLogger()
LoggerChannel
getLogger
in interface LoggerChannel
public java.lang.String getName()
LoggerChannel
getName
in interface LoggerChannel
public boolean isEnabled()
LoggerChannel
isEnabled
in interface LoggerChannel
public void setDiagnostic()
LoggerChannel
setDiagnostic
in interface LoggerChannel
public void setForce(boolean forceToFile)
LoggerChannel
setForce
in interface LoggerChannel
public boolean getForce()
getForce
in interface LoggerChannel
public void setDiagnostic(long max_file_size, boolean diag_timestamp)
setDiagnostic
in interface LoggerChannel
public void log(int log_type, java.lang.String data)
LoggerChannel
log
in interface LoggerChannel
log_type
- LT_* constantdata
- text to logpublic void log(java.lang.String data)
LoggerChannel
LoggerChannel.LT_INFORMATION
log
in interface LoggerChannel
data
- text to logpublic void log(java.lang.Object[] relatedTo, int log_type, java.lang.String data)
LoggerChannel
log
in interface LoggerChannel
relatedTo
- a list of what this log is related to (ex. Peer, Torrent,
Download, Object)log_type
- LT_* constantdata
- text to logpublic void log(java.lang.Object relatedTo, int log_type, java.lang.String data)
LoggerChannel
log
in interface LoggerChannel
relatedTo
- What this log is related to (ex. Peer, Torrent,
Download, Object, etc)log_type
- LT_* constantdata
- text to logpublic void log(java.lang.Throwable error)
LoggerChannel
LoggerChannel.LT_ERROR
log
in interface LoggerChannel
error
- Throwable object to logpublic void log(java.lang.String str, java.lang.Throwable error)
LoggerChannel
LoggerChannel.LT_ERROR
log
in interface LoggerChannel
str
- text to logerror
- Throwable object to logpublic void log(java.lang.Object[] relatedTo, java.lang.String str, java.lang.Throwable error)
LoggerChannel
log
in interface LoggerChannel
relatedTo
- a list of what this log is related to (ex. Peer, Torrent,
Download, Object)str
- text to logerror
- Error that will be appended to the log entrypublic void log(java.lang.Object relatedTo, java.lang.String str, java.lang.Throwable error)
LoggerChannel
log
in interface LoggerChannel
relatedTo
- What this log is related to (ex. Peer, Torrent,
Download, Object, etc)str
- text to logerror
- Error that will be appended to the log entrypublic void log(java.lang.Object[] relatedTo, java.lang.String data)
LoggerChannel
LoggerChannel.LT_INFORMATION
log
in interface LoggerChannel
relatedTo
- a list of what this log is related to (ex. Peer, Torrent,
Download, Object)data
- text to logpublic void log(java.lang.Object relatedTo, java.lang.String data)
LoggerChannel
LoggerChannel.LT_INFORMATION
log
in interface LoggerChannel
relatedTo
- What this log is related to (ex. Peer, Torrent,
Download, Object, etc)data
- text to logprotected void logAlert(int alert_type, java.lang.String message, boolean repeatable)
public void logAlert(int alert_type, java.lang.String message)
LoggerChannel
logAlert
in interface LoggerChannel
alert_type
- LT_* constantmessage
- text to alert user withpublic void logAlertRepeatable(int alert_type, java.lang.String message)
LoggerChannel
logAlertRepeatable
in interface LoggerChannel
alert_type
- LT_* constantmessage
- text to alert user withpublic void logAlert(java.lang.String message, java.lang.Throwable e)
LoggerChannel
logAlert
in interface LoggerChannel
message
- text to alert user withe
- Error that will be attached to the alertpublic void logAlertRepeatable(java.lang.String message, java.lang.Throwable e)
LoggerChannel
logAlertRepeatable
in interface LoggerChannel
message
- text to alert user withe
- Error that will be attached to the alertpublic void addListener(LoggerChannelListener l)
LoggerChannel
addListener
in interface LoggerChannel
l
- Listener to addpublic void removeListener(LoggerChannelListener l)
LoggerChannel
removeListener
in interface LoggerChannel
l
- Listener to remove.protected java.lang.String addTimeStamp(java.lang.String data)
protected java.lang.String getTimeStamp()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |