Home » freemarker-2.3.13 » freemarker.log » [javadoc | source]
freemarker.log
abstract public class: Logger [javadoc | source]
java.lang.Object
   freemarker.log.Logger

Direct Known Subclasses:
    Log4JLogger, AvalonLogger, JDK14Logger

The FreeMarker logging facility. This is a polymorphic implementation that will use whatever logging package it can find on the system: Apache Jakarta Log4J, Apache Jakarta Avalon LogKit, JDK1.4 logging (in this order). If it fails to find any of the above, logging will be suppressed and a short notice output to System.err. You can use the #selectLoggerLibrary(int) static method to force use of a specific logger package, or to turn off logging.
Field Summary
public static final  int LIBRARY_AUTO    Constant used with #selectLoggerLibrary(int) that indicates the engine should automatically lookup and use any available logger library. 
public static final  int LIBRARY_NONE    Constant used with #selectLoggerLibrary(int) that indicates the engine should use no logger package (i.e. turn off logging). 
public static final  int LIBRARY_JAVA    Constant used with #selectLoggerLibrary(int) that indicates the engine should use the java.util.logging logger package. 
public static final  int LIBRARY_AVALON    Constant used with #selectLoggerLibrary(int) that indicates the engine should use the Apache Jakarta Avalon LogKit logger package. 
public static final  int LIBRARY_LOG4J    Constant used with #selectLoggerLibrary(int) that indicates the engine should use the Apache Jakarta Log4J logger package. 
Method from freemarker.log.Logger Summary:
debug,   debug,   error,   error,   getLogger,   info,   info,   isDebugEnabled,   isErrorEnabled,   isFatalEnabled,   isInfoEnabled,   isWarnEnabled,   selectLoggerLibrary,   setCategoryPrefix,   warn,   warn
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.log.Logger Detail:
 abstract public  void debug(String message)
    Logs a debugging message.
 abstract public  void debug(String message,
    Throwable t)
    Logs a debugging message with accompanying throwable.
 abstract public  void error(String message)
    Logs an error message.
 abstract public  void error(String message,
    Throwable t)
    Logs an error message with accompanying throwable.
 public static Logger getLogger(String category) 
    Returns a logger for the specified category.
 abstract public  void info(String message)
    Logs an informational message.
 abstract public  void info(String message,
    Throwable t)
    Logs an informational message with accompanying throwable.
 abstract public boolean isDebugEnabled()
    Returns true if this logger will log debug messages.
 abstract public boolean isErrorEnabled()
    Returns true if this logger will log error messages.
 abstract public boolean isFatalEnabled()
    Returns true if this logger will log fatal error messages.
 abstract public boolean isInfoEnabled()
    Returns true if this logger will log informational messages.
 abstract public boolean isWarnEnabled()
    Returns true if this logger will log warning messages.
 public static  void selectLoggerLibrary(int library) throws ClassNotFoundException 
    Selects the logger library to use. If you want to change the default setting, do it early in application initialization phase, before calling any other FreeMarker API since once various parts of the FreeMarker library bind to the logging subsystem, the change in this value will have no effect on them.
 public static  void setCategoryPrefix(String prefix) 
    Sets a category prefix. This prefix is prepended to any logger category name. This makes it possible to have different FreeMarker logger categories on a per-application basis (better said, per-classloader basis). By default the category prefix is the empty string. If you set a non-empty category prefix, be sure to include the trailing separator dot (i.e. "MyApp.") If you want to change the default setting, do it early in application initialization phase, before calling any other FreeMarker API since once various parts of the FreeMarker library bind to the logging subsystem, the change in this value will have no effect on them.
 abstract public  void warn(String message)
    Logs a warning message.
 abstract public  void warn(String message,
    Throwable t)
    Logs a warning message with accompanying throwable.