| java.lang.Object org.apache.velocity.runtime.log.SystemLogChute
SystemLogChute | public class SystemLogChute implements LogChute(Code) | | Logger used when no other is configured. By default, all messages
will be printed to the System.err output stream.
author: Nathan Bubna version: $Id: SystemLogChute.java 463298 2006-10-12 16:10:32Z henning $ |
Method Summary | |
public int | getEnabledLevel() Returns the current minimum level at which messages will be printed. | protected String | getPrefix(int level) | public int | getSystemErrLevel() Returns the current minimum level at which messages will be printed
to System.err instead of System.out. | public void | init(RuntimeServices rs) | public 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. | public void | log(int level, String message) Logs messages to either std.out or std.err
depending on their severity. | public void | log(int level, String message, 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.
If the level is equal to or greater than LogChute.ERROR_ID,
messages will be printed to System.err. | public void | setEnabledLevel(int level) Set the minimum level at which messages will be printed. | public void | setSystemErrLevel(int level) Set the minimum level at which messages will be printed to System.err
instead of System.out. | protected int | toLevel(String level) |
RUNTIME_LOG_LEVEL_KEY | final public static String RUNTIME_LOG_LEVEL_KEY(Code) | | |
RUNTIME_LOG_SYSTEM_ERR_LEVEL_KEY | final public static String RUNTIME_LOG_SYSTEM_ERR_LEVEL_KEY(Code) | | |
getEnabledLevel | public int getEnabledLevel()(Code) | | Returns the current minimum level at which messages will be printed.
|
getSystemErrLevel | public int getSystemErrLevel()(Code) | | Returns the current minimum level at which messages will be printed
to System.err instead of System.out.
|
isLevelEnabled | public boolean isLevelEnabled(int level)(Code) | | This will return true if the specified level
is equal to or higher than the level this
LogChute is enabled for.
|
log | public void log(int level, String message)(Code) | | Logs messages to either std.out or std.err
depending on their severity.
Parameters: level - severity level Parameters: message - complete error message |
log | public void log(int level, String message, Throwable t)(Code) | | 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.
If the level is equal to or greater than LogChute.ERROR_ID,
messages will be printed to System.err. Otherwise, they will be
printed to System.out. If a java.lang.Throwable accompanies the
message, it's stack trace will be printed to the same stream
as the message.
Parameters: level - severity level Parameters: message - complete error message Parameters: t - the java.lang.Throwable |
setEnabledLevel | public void setEnabledLevel(int level)(Code) | | Set the minimum level at which messages will be printed.
|
setSystemErrLevel | public void setSystemErrLevel(int level)(Code) | | Set the minimum level at which messages will be printed to System.err
instead of System.out.
|
|
|