Class CommonsLogLogSystem

java.lang.Object
org.apache.velocity.tools.generic.log.CommonsLogLogSystem
All Implemented Interfaces:
org.apache.velocity.runtime.log.LogSystem

@Deprecated public class CommonsLogLogSystem extends Object implements org.apache.velocity.runtime.log.LogSystem
Deprecated.
Use CommonsLogLogChute in Velocity 1.6 instead.
Redirects Velocity's LogSystem messages to commons-logging.

Please use CommonsLogLogChute in Velocity Engine 1.6 as this will be removed in VelocityTools releases subsequent to Velocity 1.6's release, if not earlier.

To use, first set up commons-logging, then tell Velocity to use this class for logging by adding the following to your velocity.properties: runtime.log.logsystem.class = org.apache.velocity.tools.generic.log.CommonsLogLogSystem

You may also set this property to specify what log/name Velocity's messages should be logged to (example below is default). runtime.log.logsystem.commons.logging.name = org.apache.velocity

Since:
VelocityTools 1.1
Version:
$Id: CommonsLogLogSystem.java 534721 2007-05-03 05:55:15Z nbubna $
Author:
Nathan Bubna
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    Default name for the commons-logging instance
    protected Log
    Deprecated.
    the commons-logging Log instance
    static final String
    Deprecated.
    Property key for specifying the name for the log instance

    Fields inherited from interface org.apache.velocity.runtime.log.LogSystem

    DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    init(org.apache.velocity.runtime.RuntimeServices rs)
    Deprecated.
    LogSystem methods
    void
    logVelocityMessage(int level, String message)
    Deprecated.
    Send a log message from Velocity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGSYSTEM_COMMONS_LOG_NAME

      public static final String LOGSYSTEM_COMMONS_LOG_NAME
      Deprecated.
      Property key for specifying the name for the log instance
      See Also:
    • DEFAULT_LOG_NAME

      public static final String DEFAULT_LOG_NAME
      Deprecated.
      Default name for the commons-logging instance
      See Also:
    • log

      protected Log log
      Deprecated.
      the commons-logging Log instance
  • Constructor Details

    • CommonsLogLogSystem

      public CommonsLogLogSystem()
      Deprecated.
  • Method Details

    • init

      public void init(org.apache.velocity.runtime.RuntimeServices rs) throws Exception
      Deprecated.
      LogSystem methods
      Specified by:
      init in interface org.apache.velocity.runtime.log.LogSystem
      Throws:
      Exception
    • logVelocityMessage

      public void logVelocityMessage(int level, String message)
      Deprecated.
      Send a log message from Velocity.
      Specified by:
      logVelocityMessage in interface org.apache.velocity.runtime.log.LogSystem