org.jfree.util
public class Log extends Object
Nested Class Summary | |
---|---|
static class | Log.SimpleMessage
A simple message class. |
Constructor Summary | |
---|---|
protected | Log()
Creates a new Log instance. |
Method Summary | |
---|---|
void | addTarget(LogTarget target)
Adds a log target to this facility. |
static LogContext | createContext(Class context)
Creates a log context.
|
static LogContext | createContext(String context)
Creates a log context.
|
static void | debug(Object message)
A convenience method for logging a 'debug' message.
|
static void | debug(Object message, Exception e)
A convenience method for logging a 'debug' message.
|
protected static void | defineLog(Log log)
Redefines or clears the currently used log instance.
|
protected void | doLog(int level, Object message)
Logs a message to the main log stream. |
protected void | doLog(int level, Object message, Exception e)
Logs a message to the main log stream. |
static void | error(Object message)
A convenience method for logging an 'error' message.
|
static void | error(Object message, Exception e)
A convenience method for logging an 'error' message.
|
int | getDebuglevel()
Returns the currently defined debug level. |
static Log | getInstance()
Returns the singleton Log instance. |
LogTarget[] | getTargets()
Returns the registered logtargets.
|
static void | info(Object message)
A convenience method for logging an 'info' message.
|
static void | info(Object message, Exception e)
A convenience method for logging an 'info' message.
|
void | init()
Initializes the logging system. |
protected LogContext | internalCreateContext(String context)
Creates a log context.
|
static boolean | isDebugEnabled()
Returns true, if the log level allows debug messages to be
printed.
|
static boolean | isErrorEnabled()
Returns true, if the log level allows error messages to be
printed.
|
static boolean | isInfoEnabled()
Returns true, if the log level allows informational
messages to be printed.
|
static boolean | isWarningEnabled()
Returns true, if the log level allows warning messages to be
printed.
|
static void | log(int level, Object message)
Logs a message to the main log stream. |
static void | log(int level, Object message, Exception e)
Logs a message to the main log stream. |
void | removeTarget(LogTarget target)
Removes a log target from this facility.
|
void | replaceTargets(LogTarget target)
Replaces all log targets by the given target.
|
protected void | setDebuglevel(int debuglevel)
Defines the debug level for the log system.
|
static void | warn(Object message)
A convenience method for logging a 'warning' message.
|
static void | warn(Object message, Exception e)
A convenience method for logging a 'warning' message.
|
Parameters: target the target.
Parameters: context the class (null
not permitted).
Returns: A log context.
Parameters: context the label for the context.
Returns: A log context.
Parameters: message the message.
Parameters: message the message. e the exception.
Parameters: log the new log instance or null, to return to the default implementation.
Parameters: level log level of the message. message text to be logged.
Parameters: level log level of the message. message text to be logged. e the exception, which should be logged.
Parameters: message the message.
Parameters: message the message. e the exception.
Returns: the debug level.
Returns: the singleton instance.
Returns: the logtargets.
Parameters: message the message.
Parameters: message the message. e the exception.
Parameters: context the name of the logging context (a common prefix).
Returns: A log context.
Returns: true, if messages with an log level of DEBUG are allowed.
Returns: true, if messages with an log level of ERROR are allowed.
Returns: true, if messages with an log level of INFO are allowed.
Returns: true, if messages with an log level of WARN are allowed.
Parameters: level log level of the message. message text to be logged.
Parameters: level log level of the message. message text to be logged. e the exception, which should be logged.
Parameters: target the target to remove.
Parameters: target the new and only logtarget.
Parameters: debuglevel the new debug level
See Also: getDebuglevel
Parameters: message the message.
Parameters: message the message. e the exception.