public class RedwoodConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RedwoodConfiguration.Handlers |
static interface |
RedwoodConfiguration.Thunk |
Modifier | Constructor and Description |
---|---|
protected |
RedwoodConfiguration()
Private constructor to prevent use of "new RedwoodConfiguration()"
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply this configuration to Redwood
|
static void |
apply(Properties props)
Parses a properties file and applies it immediately to Redwood
|
RedwoodConfiguration |
capture(OutputStream stream)
Capture a system stream
|
RedwoodConfiguration |
channelWidth(int width)
Set the width of the channels (or 0 to not show channels)
|
RedwoodConfiguration |
clear()
Clear any custom configurations to Redwood
|
static RedwoodConfiguration |
current()
The current Redwood configuration; this is used to make incremental changes
to an existing custom configuration.
|
static RedwoodConfiguration |
empty()
An empty Redwood configuration.
|
RedwoodConfiguration |
handlers(RedwoodConfiguration.Thunk... paths)
|
RedwoodConfiguration |
neatExit()
Close tracks when the JVM shuts down.
|
RedwoodConfiguration |
output(String method)
Determine where, in the end, console output should go.
|
static RedwoodConfiguration |
parse(Properties props)
Configure Redwood (from scratch) based on a Properties file.
|
RedwoodConfiguration |
restore(OutputStream stream) |
static RedwoodConfiguration |
standard()
The default Redwood configuration, which prints to the console.
|
protected RedwoodConfiguration()
public void apply()
public RedwoodConfiguration capture(OutputStream stream)
stream
- The stream to capture; one of System.out or System.errpublic RedwoodConfiguration restore(OutputStream stream)
public RedwoodConfiguration output(String method)
method
- An output, one of: stdout, stderr, or java.util.loggingpublic RedwoodConfiguration channelWidth(int width)
width
- The left margin in which to show channelspublic RedwoodConfiguration clear()
public RedwoodConfiguration handlers(RedwoodConfiguration.Thunk... paths)
For example:
handlers(branch(
chain( hideDebug, collapseApproximate, branch( output, file("stderr.log") ),
chain( showOnlyError, file("err.log") ).
chain( showOnlyChannels("results", "evaluate"), file("results.log") ),
chain( file("redwood.log") ),
noop))
paths
- A number of paths to add.public RedwoodConfiguration neatExit()
public static RedwoodConfiguration empty()
public static RedwoodConfiguration standard()
public static RedwoodConfiguration current()
public static RedwoodConfiguration parse(Properties props)
props
- The properties to use in configurationpublic static void apply(Properties props)
props
- The properties to apply