org.apache.velocity.runtime.log
public class ServletLogChute extends java.lang.Object implements LogChute
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX |
static java.lang.String |
RUNTIME_LOG_LEVEL_KEY |
protected javax.servlet.ServletContext |
servletContext |
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
Constructor and Description |
---|
ServletLogChute()
Construct a simple logger for a servlet environment.
|
Modifier and Type | Method and Description |
---|---|
int |
getEnabledLevel()
Returns the current minimum level at which messages will be printed.
|
void |
init(RuntimeServices rs)
init()
|
boolean |
isLevelEnabled(int level)
This will return true if the specified level
is equal to or higher than the level this
LogChute is enabled for.
|
void |
log(int level,
java.lang.String message)
Send a log message from Velocity.
|
void |
log(int level,
java.lang.String message,
java.lang.Throwable t)
Send a log message from Velocity along with an exception or error
|
void |
setEnabledLevel(int level)
Set the minimum level at which messages will be printed.
|
protected int |
toLevel(java.lang.String level) |
public static final java.lang.String RUNTIME_LOG_LEVEL_KEY
protected javax.servlet.ServletContext servletContext
public static final java.lang.String PREFIX
public ServletLogChute()
public void init(RuntimeServices rs) throws java.lang.Exception
protected int toLevel(java.lang.String level)
public void setEnabledLevel(int level)
public int getEnabledLevel()
public boolean isLevelEnabled(int level)
isLevelEnabled
in interface LogChute
public void log(int level, java.lang.String message)
Copyright © 2000-2014. All Rights Reserved.