org.apache.velocity.runtime.log

Class Log4JLogSystem

public class Log4JLogSystem extends Object implements LogSystem

Deprecated: As of v1.3. Use SimpleLog4jLogSystem

Implementation of a Log4J logger.

Version: $Id: Log4JLogSystem.java,v 1.7.4.1 2004/03/03 23:22:56 geirm Exp $

Author: Jon S. Stevens

Field Summary
protected Layoutlayout
logging layout
Stringlogfile
the runtime.log property value
protected Categorylogger
log4java logging interface
RuntimeServicesrsvc
Constructor Summary
Log4JLogSystem()
default CTOR.
Method Summary
voidconfigureEmail()
Configures the logging to email
voidconfigureFile()
Configures the logging to a file.
voidconfigureRemote()
Configures the logging to a remote server
voidconfigureSyslog()
Configures the logging to syslogd
protected voidfinalize()
Also do a shutdown if the object is destroy()'d.
voidinit(RuntimeServices rs)
voidinternalInit()
initializes the log system using the logfile argument
voidlogVelocityMessage(int level, String message)
logs messages
voidshutdown()
Close all destinations

Field Detail

layout

protected Layout layout
logging layout

logfile

private String logfile
the runtime.log property value

logger

protected Category logger
log4java logging interface

rsvc

private RuntimeServices rsvc

Constructor Detail

Log4JLogSystem

public Log4JLogSystem()
default CTOR. Initializes itself using the property RUNTIME_LOG from the Velocity properties

Method Detail

configureEmail

private void configureEmail()
Configures the logging to email

configureFile

private void configureFile()
Configures the logging to a file.

configureRemote

private void configureRemote()
Configures the logging to a remote server

configureSyslog

private void configureSyslog()
Configures the logging to syslogd

finalize

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

init

public void init(RuntimeServices rs)

internalInit

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

Parameters: logFile file for log messages

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.