public class Log4JLogChute extends Object implements LogChute
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Logger |
logger
Log4J logging API.
|
static String |
RUNTIME_LOG_LOG4J_LOGGER |
static String |
RUNTIME_LOG_LOG4J_LOGGER_LEVEL |
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
Constructor and Description |
---|
Log4JLogChute() |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Also do a shutdown if the object is destroy()'d.
|
void |
init(RuntimeServices rs)
Initializes this LogChute.
|
boolean |
isLevelEnabled(int level)
Tell whether or not a log level is enabled.
|
void |
log(int level,
String message)
logs messages
|
void |
log(int level,
String message,
Throwable t)
Send a log message from Velocity along with an exception or error
|
void |
shutdown()
Close all destinations
|
public static final String RUNTIME_LOG_LOG4J_LOGGER
public static final String RUNTIME_LOG_LOG4J_LOGGER_LEVEL
protected org.apache.log4j.Logger logger
public void init(RuntimeServices rs) throws Exception
LogChute
init
in interface LogChute
Exception
LogChute.init(org.apache.velocity.runtime.RuntimeServices)
public void log(int level, String message)
public void log(int level, String message, Throwable t)
LogChute
log
in interface LogChute
LogChute.log(int, java.lang.String, java.lang.Throwable)
public boolean isLevelEnabled(int level)
LogChute
isLevelEnabled
in interface LogChute
LogChute.isLevelEnabled(int)
protected void finalize() throws Throwable
public void shutdown()
Copyright © 2000–2017. All rights reserved.