com.jrefinery.report.ext.log
Class Log4JLogTarget

java.lang.Object
  extended bycom.jrefinery.report.ext.log.Log4JLogTarget
All Implemented Interfaces:
org.jfree.util.LogTarget

public class Log4JLogTarget
extends java.lang.Object
implements org.jfree.util.LogTarget

The Log4J Target can be used to redirect the logging output into the Log4J system. When loaded using the default constructor, the Category is set the "JFreeReport".

Author:
Thomas Morgner
See Also:
Log

Field Summary
 
Fields inherited from interface org.jfree.util.LogTarget
DEBUG, ERROR, INFO, LEVELS, WARN
 
Constructor Summary
Log4JLogTarget()
          Creates a new Log4J log target, which logs all statements into the category "JFreeReport".
Log4JLogTarget(org.apache.log4j.Category cat)
          Creates a new Log4J log target, which uses the given Category to log the generated log statements.
 
Method Summary
 void log(int level, java.lang.Object message)
          Logs a message at a specified log level.
 void log(int level, java.lang.Object message, java.lang.Exception e)
          Logs a message at a specified log level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4JLogTarget

public Log4JLogTarget()
Creates a new Log4J log target, which logs all statements into the category "JFreeReport".


Log4JLogTarget

public Log4JLogTarget(org.apache.log4j.Category cat)
Creates a new Log4J log target, which uses the given Category to log the generated log statements.

Parameters:
cat - the category, that should be used for logging.
Method Detail

log

public void log(int level,
                java.lang.Object message)
Logs a message at a specified log level. The message is logged using the private Log4J Category.

Specified by:
log in interface org.jfree.util.LogTarget
Parameters:
level - the log level.
message - the log message.

log

public void log(int level,
                java.lang.Object message,
                java.lang.Exception e)
Logs a message at a specified log level. The message is logged using the private Log4J Category.

Specified by:
log in interface org.jfree.util.LogTarget
Parameters:
level - the log level.
message - the log message.
e - the exception