public class RedwoodConfiguration
extends java.lang.Object
| 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 |
captureStderr()
Capture stderr and route them through Redwood
|
RedwoodConfiguration |
captureStdout()
Capture stdout and route them through Redwood
|
RedwoodConfiguration |
captureStreams()
Capture stdout and stderr and route them through Redwood
|
RedwoodConfiguration |
clear()
Clear any custom configurations to Redwood
|
RedwoodConfiguration |
collapseApproximate()
Collapse repeated records, using an approximate notion of equality
(i.e.
|
RedwoodConfiguration |
collapseExact()
Collapse repeated records, using exact string match on the record.
|
RedwoodConfiguration |
collapseNone()
Do not collapse repeated records
|
RedwoodConfiguration |
console()
Add a console pipeline to the Redwood handler tree,
Calling this multiple times will result in messages being printed
multiple times.
|
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 |
file(java.lang.String file,
java.lang.String... channels)
Add a file pipeline to the Redwood handler tree.
|
RedwoodConfiguration |
handler(LogRecordHandler parent,
LogRecordHandler child)
Add a handler to as a child of an existing parent
|
RedwoodConfiguration |
hideChannels(java.lang.Object[] channels)
Hide the following channels.
|
RedwoodConfiguration |
loggingClass(java.lang.Class<?> classToIgnoreInTraces)
Set a Java class to ignore when printing stack traces
|
RedwoodConfiguration |
loggingClass(java.lang.String classToIgnoreInTraces)
Set a Java classname path to ignore when printing stack traces
|
RedwoodConfiguration |
neatExit()
Close tracks when the JVM shuts down.
|
static RedwoodConfiguration |
parse(java.util.Properties props)
Configure Redwood (from scratch) based on a Properties file.
|
RedwoodConfiguration |
printChannels(int width)
Print channels to the left of log messages
|
RedwoodConfiguration |
rootHandler(LogRecordHandler handler)
Add a custom Log Record Handler to the root of the tree
|
RedwoodConfiguration |
showOnlyChannels(java.lang.Object[] channels)
Show only the following channels.
|
RedwoodConfiguration |
splice(LogRecordHandler parent,
LogRecordHandler toAdd,
LogRecordHandler grandchild)
Add a handler to as a child of an existing parent
|
static RedwoodConfiguration |
standard()
The default Redwood configuration, which prints to the console.
|
RedwoodConfiguration |
stderr()
Add a console pipeline to the Redwood handler tree,
printing to stderr.
|
RedwoodConfiguration |
stdout()
Add a console pipeline to the Redwood handler tree,
printing to stdout.
|
protected RedwoodConfiguration()
public void apply()
public RedwoodConfiguration clear()
public RedwoodConfiguration stdout()
public RedwoodConfiguration stderr()
public RedwoodConfiguration console()
public RedwoodConfiguration file(java.lang.String file, java.lang.String... channels)
file - The path of the file to log to. This path is not checked
for correctness here.public RedwoodConfiguration rootHandler(LogRecordHandler handler)
handler - The handler to addpublic RedwoodConfiguration handler(LogRecordHandler parent, LogRecordHandler child)
parent - The handler to extendchild - The new handler to addpublic RedwoodConfiguration splice(LogRecordHandler parent, LogRecordHandler toAdd, LogRecordHandler grandchild)
parent - The handler to extendtoAdd - The new handler to addgrandchild - The subtree to attach to the new handlerpublic RedwoodConfiguration loggingClass(java.lang.String classToIgnoreInTraces)
classToIgnoreInTraces - The class name (with packages, etc) to ignore.public RedwoodConfiguration loggingClass(java.lang.Class<?> classToIgnoreInTraces)
classToIgnoreInTraces - The class to ignore.public RedwoodConfiguration collapseApproximate()
public RedwoodConfiguration collapseExact()
public RedwoodConfiguration collapseNone()
public RedwoodConfiguration captureStdout()
public RedwoodConfiguration captureStderr()
public RedwoodConfiguration captureStreams()
public RedwoodConfiguration neatExit()
public RedwoodConfiguration printChannels(int width)
width - The width (in characters) to print the channelspublic RedwoodConfiguration hideChannels(java.lang.Object[] channels)
channels - The names of the channels to hide.public RedwoodConfiguration showOnlyChannels(java.lang.Object[] channels)
channels - The names of the channels to show.public static RedwoodConfiguration empty()
public static RedwoodConfiguration standard()
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