Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | 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 2001/11/17 12:02:35 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, registerNatives, 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

  ### 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.
    Overrides:
      `finalize` in class `java.lang.Object`

  ### shutdown

      public void shutdown()

    Close all destinations

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

  Copyright © 2003 Apache Software Foundation. All Rights Reserved.