org.apache.velocity.test.misc
Class TestLogChute
java.lang.Object
org.apache.velocity.runtime.log.SystemLogChute
org.apache.velocity.test.misc.TestLogChute
- All Implemented Interfaces:
- LogChute
public class TestLogChute
- extends SystemLogChute
LogChute implementation that can easily capture output
or suppress it entirely. By default, both capture and suppress
are on. To have this behave like a normal SystemLogChute,
you must turn it on() and stopCapture().
- Version:
- $Id: TestLogChute.java 697214 2008-09-19 19:55:59Z nbubna $
- Author:
- Will Glass-Husain, Nathan Bubna
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEST_LOGGER_LEVEL
public static final String TEST_LOGGER_LEVEL
- See Also:
- Constant Field Values
TestLogChute
public TestLogChute()
TestLogChute
public TestLogChute(boolean suppress,
boolean capture)
init
public void init(RuntimeServices rs)
throws Exception
- Specified by:
init
in interface LogChute
- Overrides:
init
in class SystemLogChute
- Throws:
Exception
on
public void on()
off
public void off()
startCapture
public void startCapture()
stopCapture
public void stopCapture()
isLevelEnabled
public boolean isLevelEnabled(int level)
- Specified by:
isLevelEnabled
in interface LogChute
- Overrides:
isLevelEnabled
in class SystemLogChute
write
protected void write(PrintStream ps,
String prefix,
String message,
Throwable t)
- Overrides:
write
in class SystemLogChute
getLog
public String getLog()
- Return the captured log messages to date.
- Returns:
- log messages
Copyright © 2000-2008 The Apache Software Foundation. All Rights Reserved.