public class RedwoodConfiguration
extends java.lang.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(java.util.Properties props)
Parses a properties file and applies it immediately to Redwood
|
RedwoodConfiguration |
capture(java.io.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 |
debugLevel()
Run Redwood with SLF4J if available, otherwise with stderr logging at the debug (everything) level.
|
static RedwoodConfiguration |
empty()
An empty Redwood configuration.
|
static RedwoodConfiguration |
errorLevel()
Run Redwood with SLF4J if available, otherwise with stderr logging at the error only level.
|
RedwoodConfiguration |
handlers(RedwoodConfiguration.Thunk... paths)
Add handlers to Redwood.
|
static RedwoodConfiguration |
infoLevel()
Run Redwood with SLF4J if available, otherwise with stderr logging at the warning (and error) level.
|
static RedwoodConfiguration |
javaUtilLogging()
Run Redwood with java.util.logging
|
static RedwoodConfiguration |
minimal()
The default Redwood configuration, which prints to the console without channels.
|
RedwoodConfiguration |
neatExit()
Close tracks when the JVM shuts down.
|
RedwoodConfiguration |
output(java.lang.String method)
Determine where, in the end, console output should go.
|
static RedwoodConfiguration |
parse(java.util.Properties props)
Configure Redwood (from scratch) based on a Properties file.
|
RedwoodConfiguration |
restore(java.io.OutputStream stream) |
static RedwoodConfiguration |
slf4j()
Run Redwood with SLF4J as the console backend
|
static RedwoodConfiguration |
standard()
A standard Redwood configuration, which prints to the console with channels.
|
protected RedwoodConfiguration()
public void apply()
public RedwoodConfiguration capture(java.io.OutputStream stream)
stream
- The stream to capture; one of System.out or System.errpublic RedwoodConfiguration restore(java.io.OutputStream stream)
public RedwoodConfiguration output(java.lang.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)
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 minimal()
public static RedwoodConfiguration slf4j()
apply()
.public static RedwoodConfiguration debugLevel()
apply()
.public static RedwoodConfiguration infoLevel()
apply()
.public static RedwoodConfiguration errorLevel()
apply()
.public static RedwoodConfiguration javaUtilLogging()
apply()
.public static RedwoodConfiguration current()
public static RedwoodConfiguration parse(java.util.Properties props)
props
- The properties to use in configurationpublic static void apply(java.util.Properties props)
props
- The properties to apply