org.apache.velocity.runtime.log
Class Log4JLogSystem
java.lang.Objectorg.apache.velocity.runtime.log.Log4JLogSystem
- LogSystem
public class Log4JLogSystem
extends java.lang.Object
Implementation of a Log4J logger.
SimpleLog4jLogSystem
Version:
- Jon S. Stevens
layout
protected Layout layout
logging layout
logfile
private String logfile
the runtime.log property value
logger
protected Category logger
log4java logging interface
Log4JLogSystem
public Log4JLogSystem()
default CTOR. Initializes itself using the property RUNTIME_LOG
from the Velocity properties
configureEmail
private void configureEmail()
throws Exception Configures the logging to email
configureFile
private void configureFile()
throws Exception Configures the logging to a file.
configureRemote
private void configureRemote()
throws Exception Configures the logging to a remote server
configureSyslog
private void configureSyslog()
throws Exception Configures the logging to syslogd
finalize
protected void finalize()
throws Throwable Also do a shutdown if the object is destroy()'d.
internalInit
private void internalInit()
throws Exception initializes the log system using the logfile argument
logVelocityMessage
public void logVelocityMessage(int level,
String message) logs messages
- logVelocityMessage in interface LogSystem
level - severity levelmessage - complete error message
shutdown
public void shutdown()
Close all destinations
Copyright © 2003 Apache Software Foundation. All Rights Reserved.