Class ServletLogChute

java.lang.Object
org.apache.velocity.tools.view.ServletLogChute
All Implemented Interfaces:
org.apache.velocity.runtime.log.LogChute
Direct Known Subclasses:
ServletLogger

@Deprecated public class ServletLogChute extends Object implements org.apache.velocity.runtime.log.LogChute
Deprecated.
This class has been moved to Velocity Engine 1.6+ and only remains here temporarily for users of previous Velocity Engine versions.
Simple wrapper for the servlet log. This passes Velocity log messages to ServletContext.log(String). You may configure the level of output in your velocity.properties by adding the "runtime.log.logsystem.servlet.level" property with one of the following values: error, warn, info, debug, or trace. The default is trace.
Version:
$Revision: 534682 $ $Date: 2007-05-02 18:50:54 -0700 (Wed, 02 May 2007) $
Author:
Geir Magnusson Jr., Nathan Bubna
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    Deprecated.
     
    static final String
    Deprecated.
     
    static final String
    Deprecated.
     
    protected ServletContext
    Deprecated.
     

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

    DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Construct a simple logger for a servlet environment.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated.
    Returns the current minimum level at which messages will be printed.
    void
    init(org.apache.velocity.runtime.RuntimeServices rs)
    Deprecated.
    init()
    boolean
    isLevelEnabled(int level)
    Deprecated.
    This will return true if the specified level is equal to or higher than the level this LogChute is enabled for.
    void
    log(int level, String message)
    Deprecated.
    Send a log message from Velocity.
    void
    log(int level, String message, Throwable t)
    Deprecated.
     
    void
    setEnabledLevel(int level)
    Deprecated.
    Set the minimum level at which messages will be printed.
    protected int
    toLevel(String level)
    Deprecated.
     

    Methods inherited from class java.lang.Object

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

    • RUNTIME_LOG_LEVEL_KEY

      public static final String RUNTIME_LOG_LEVEL_KEY
      Deprecated.
      See Also:
    • enabled

      private int enabled
      Deprecated.
    • servletContext

      protected ServletContext servletContext
      Deprecated.
    • PREFIX

      public static final String PREFIX
      Deprecated.
      See Also:
  • Constructor Details

    • ServletLogChute

      public ServletLogChute()
      Deprecated.
      Construct a simple logger for a servlet environment.
      NOTE: this class expects that the ServletContext has already been placed in the runtime's application attributes under its full class name (i.e. "javax.servlet.ServletContext").
  • Method Details

    • init

      public void init(org.apache.velocity.runtime.RuntimeServices rs) throws Exception
      Deprecated.
      init()
      Specified by:
      init in interface org.apache.velocity.runtime.log.LogChute
      Throws:
      IllegalStateException - if the ServletContext is not available in the application attributes under the appropriate key.
      Exception
    • toLevel

      protected int toLevel(String level)
      Deprecated.
    • setEnabledLevel

      public void setEnabledLevel(int level)
      Deprecated.
      Set the minimum level at which messages will be printed.
    • getEnabledLevel

      public int getEnabledLevel()
      Deprecated.
      Returns the current minimum level at which messages will be printed.
    • isLevelEnabled

      public boolean isLevelEnabled(int level)
      Deprecated.
      This will return true if the specified level is equal to or higher than the level this LogChute is enabled for.
      Specified by:
      isLevelEnabled in interface org.apache.velocity.runtime.log.LogChute
    • log

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

      public void log(int level, String message, Throwable t)
      Deprecated.
      Specified by:
      log in interface org.apache.velocity.runtime.log.LogChute