org.jfree.report.util
Class Log

java.lang.Object
  extended byorg.jfree.util.Log
      extended byorg.jfree.report.util.Log

public final class Log
extends org.jfree.util.Log

A simple logging facility. Create a class implementing the LogTarget interface to use this feature.

Author:
Thomas Morgner

Nested Class Summary
static class Log.MemoryUsageMessage
          A helper class to print memory usage message if needed.
static class Log.PadMessage
          A message object that pads the output if the text is shorted than the given length.
 
Nested classes inherited from class org.jfree.util.Log
org.jfree.util.Log.SimpleMessage
 
Field Summary
static int DEBUG
          The log level for debug messages.
static int ERROR
          The log level for error messages.
static int INFO
          The log level for information messages.
static int WARN
          The log level for warning messages.
 
Method Summary
static void debug(java.lang.Object message)
          A convenience method for logging a 'debug' message.
static void debug(java.lang.Object message, java.lang.Exception e)
          A convenience method for logging a 'debug' message.
static void error(java.lang.Object message)
          A convenience method for logging an 'error' message.
static void error(java.lang.Object message, java.lang.Exception e)
          A convenience method for logging an 'error' message.
static Log getJFreeReportLog()
          Returns the JFreeReport log instance.
static void info(java.lang.Object message)
          A convenience method for logging an 'info' message.
static void info(java.lang.Object message, java.lang.Exception e)
          A convenience method for logging an 'info' message.
 void init()
          Initializes the log system after the log module was loaded and a log target was defined.
static void log(int level, java.lang.Object message)
          Logs a message to the main log stream.
static void log(int level, java.lang.Object message, java.lang.Exception e)
          Logs a message to the main log stream.
static void warn(java.lang.Object message)
          A convenience method for logging a 'warning' message.
static void warn(java.lang.Object message, java.lang.Exception e)
          A convenience method for logging a 'warning' message.
 
Methods inherited from class org.jfree.util.Log
addTarget, createContext, createContext, defineLog, doLog, doLog, getDebuglevel, getInstance, getTargets, internalCreateContext, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarningEnabled, removeTarget, replaceTargets, setDebuglevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR

public static final int ERROR
The log level for error messages.

See Also:
Constant Field Values

WARN

public static final int WARN
The log level for warning messages.

See Also:
Constant Field Values

INFO

public static final int INFO
The log level for information messages.

See Also:
Constant Field Values

DEBUG

public static final int DEBUG
The log level for debug messages.

See Also:
Constant Field Values
Method Detail

getJFreeReportLog

public static Log getJFreeReportLog()
Returns the JFreeReport log instance.

Returns:
the log object.

init

public void init()
Initializes the log system after the log module was loaded and a log target was defined. This is the second step of the log initialisation.


debug

public static void debug(java.lang.Object message)
A convenience method for logging a 'debug' message.

Parameters:
message - the message.

debug

public static void debug(java.lang.Object message,
                         java.lang.Exception e)
A convenience method for logging a 'debug' message.

Parameters:
message - the message.
e - the exception.

info

public static void info(java.lang.Object message)
A convenience method for logging an 'info' message.

Parameters:
message - the message.

info

public static void info(java.lang.Object message,
                        java.lang.Exception e)
A convenience method for logging an 'info' message.

Parameters:
message - the message.
e - the exception.

warn

public static void warn(java.lang.Object message)
A convenience method for logging a 'warning' message.

Parameters:
message - the message.

warn

public static void warn(java.lang.Object message,
                        java.lang.Exception e)
A convenience method for logging a 'warning' message.

Parameters:
message - the message.
e - the exception.

error

public static void error(java.lang.Object message)
A convenience method for logging an 'error' message.

Parameters:
message - the message.

error

public static void error(java.lang.Object message,
                         java.lang.Exception e)
A convenience method for logging an 'error' message.

Parameters:
message - the message.
e - the exception.

log

public static void log(int level,
                       java.lang.Object message)
Logs a message to the main log stream. All attached log targets will also receive this message. If the given log-level is higher than the given debug-level in the main config file, no logging will be done.

Parameters:
level - log level of the message.
message - text to be logged.

log

public static void log(int level,
                       java.lang.Object message,
                       java.lang.Exception e)
Logs a message to the main log stream. All attached logTargets will also receive this message. If the given log-level is higher than the given debug-level in the main config file, no logging will be done. The exception's stacktrace will be appended to the log-stream

Parameters:
level - log level of the message.
message - text to be logged.
e - the exception, which should be logged.