Package org.oddjob.tools
Class ConsoleCapture
java.lang.Object
org.oddjob.tools.ConsoleCapture
Capturing Oddjob.CONSOLE: Because tests append to the console log to
avoid capturing test logging then the Logger class must be Loaded before
the Oddjob class is loaded. This is because Oddjob's static initialiser
replaces the default stdout with its own console capture. If the Logger
class loads first it will be appending to original stdout, not the
new stdout.
This is most easily achieved by including a logger in the test.
- Author:
- rob
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncapture(LogArchive archive) voiddump()voiddump(org.slf4j.Logger logger) getAll()String[]getLines()booleanvoidsetLeaveLogging(boolean leaveLogging) intsize()
-
Constructor Details
-
ConsoleCapture
public ConsoleCapture()
-
-
Method Details
-
captureConsole
-
capture
-
getLines
-
getAsList
-
getAll
-
size
public int size() -
isLeaveLogging
public boolean isLeaveLogging() -
setLeaveLogging
public void setLeaveLogging(boolean leaveLogging) -
dump
public void dump() -
dump
public void dump(org.slf4j.Logger logger) -
getFilter
-