org.apache.velocity.runtime.log
public class SystemLogChute extends java.lang.Object implements LogChute
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RUNTIME_LOG_LEVEL_KEY |
static java.lang.String |
RUNTIME_LOG_SYSTEM_ERR_LEVEL_KEY |
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
Constructor and Description |
---|
SystemLogChute() |
Modifier and Type | Method and Description |
---|---|
int |
getEnabledLevel()
Returns the current minimum level at which messages will be printed.
|
protected java.lang.String |
getPrefix(int level) |
int |
getSystemErrLevel()
Returns the current minimum level at which messages will be printed
to System.err instead of System.out.
|
void |
init(RuntimeServices rs)
Initializes this LogChute.
|
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)
Logs messages to either std.out or std.err
depending on their severity.
|
void |
log(int level,
java.lang.String message,
java.lang.Throwable t)
Logs messages to the system console so long as the specified level
is equal to or greater than the level this LogChute is enabled for.
|
void |
setEnabledLevel(int level)
Set the minimum level at which messages will be printed.
|
void |
setSystemErrLevel(int level)
Set the minimum level at which messages will be printed to System.err
instead of System.out.
|
protected int |
toLevel(java.lang.String level) |
protected void |
write(java.io.PrintStream stream,
java.lang.String prefix,
java.lang.String message,
java.lang.Throwable t) |
public static final java.lang.String RUNTIME_LOG_LEVEL_KEY
public static final java.lang.String RUNTIME_LOG_SYSTEM_ERR_LEVEL_KEY
public void init(RuntimeServices rs) throws java.lang.Exception
LogChute
protected int toLevel(java.lang.String level)
protected java.lang.String getPrefix(int level)
public void log(int level, java.lang.String message)
public void log(int level, java.lang.String message, java.lang.Throwable t)
protected void write(java.io.PrintStream stream, java.lang.String prefix, java.lang.String message, java.lang.Throwable t)
public void setEnabledLevel(int level)
public int getEnabledLevel()
public void setSystemErrLevel(int level)
public int getSystemErrLevel()
public boolean isLevelEnabled(int level)
isLevelEnabled
in interface LogChute
Copyright © 2000-2014. All Rights Reserved.