SimpleLog4JLogSystem (Velocity 1.4 API)
Keywords: org.apache.velocity.runtime.log.SimpleLog4JLogSystem class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.log
Class SimpleLog4JLogSystem

    java.lang.Object
      org.apache.velocity.runtime.log.SimpleLog4JLogSystem

All Implemented Interfaces:
  LogSystem

public class SimpleLog4JLogSystem
extends java.lang.Object
implements LogSystem

Implementation of a simple log4j system that will either latch onto an existing category, or just do a simple rolling file log. Derived from Jon's 'complicated' version :)

Version:
  $Id: SimpleLog4JLogSystem.java,v 1.1.8.1 2004/03/03 23:22:57 geirm Exp $
Author:

  Field Summary
  `protected org.apache.log4j.Category` | `logger` log4java logging interface
  `private RuntimeServices` | `rsvc`

  Fields inherited from interface org.apache.velocity.runtime.log.LogSystem
  `DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID`

  Constructor Summary
  `SimpleLog4JLogSystem()`

  Method Summary
  `protected void` | `finalize()` Also do a shutdown if the object is destroy()'d.
  `void` | `init(RuntimeServices rs)` init()
  `private void` | `internalInit(java.lang.String logfile)` initializes the log system using the logfile argument
  `void` | `logVelocityMessage(int level, java.lang.String message)` logs messages
  `void` | `shutdown()` Close all destinations

  Methods inherited from class java.lang.Object
  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  Field Detail

  ### rsvc

      private RuntimeServices rsvc

  ### logger

      protected org.apache.log4j.Category logger

    log4java logging interface

  Constructor Detail

  ### SimpleLog4JLogSystem

      public SimpleLog4JLogSystem()

  Method Detail

  ### init

      public void init(RuntimeServices rs)

    Description copied from interface: `LogSystem`
    init()

    Specified by:
      `init` in interface `LogSystem`

  ### internalInit

      private void internalInit(java.lang.String logfile)
                         throws java.lang.Exception

    initializes the log system using the logfile argument

    Throws:
      `java.lang.Exception`

  ### logVelocityMessage

      public void logVelocityMessage(int level,
                                     java.lang.String message)

    logs messages

    Specified by:
      `logVelocityMessage` in interface `LogSystem`
    Parameters:
      `level` - severity level
      `message` - complete error message

  ### finalize

      protected void finalize()
                       throws java.lang.Throwable

    Also do a shutdown if the object is destroy()'d.

    Throws:
      `java.lang.Throwable`

  ### shutdown

      public void shutdown()

    Close all destinations

  Overview | Package | Class | Use | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

  Copyright © 2002 Apache Software Foundation. All Rights Reserved.