org.apache.velocity.runtime.log

Class SimpleLog4JLogSystem

public class SimpleLog4JLogSystem extends 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 Categorylogger

log4java logging interface
RuntimeServicesrsvc
Constructor Summary
SimpleLog4JLogSystem()
Method Summary
protected voidfinalize()
Also do a shutdown if the object is destroy()'d.
voidinit(RuntimeServices rs)
voidinternalInit(String logfile)
initializes the log system using the logfile argument
voidlogVelocityMessage(int level, String message)
logs messages
voidshutdown()
Close all destinations

Field Detail

logger

protected Category logger
log4java logging interface

rsvc

private RuntimeServices rsvc

Constructor Detail

SimpleLog4JLogSystem

public SimpleLog4JLogSystem()

Method Detail

finalize

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

init

public void init(RuntimeServices rs)

internalInit

private void internalInit(String logfile)
initializes the log system using the logfile argument

logVelocityMessage

public void logVelocityMessage(int level, String message)
logs messages

Parameters: level severity level message complete error message

shutdown

public void shutdown()
Close all destinations
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.