|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.util.logging.RedwoodConfiguration
public class RedwoodConfiguration
A class which encapsulates configuration settings for Redwood. The class operates on the builder model; that is, you can chain method calls.
Constructor Summary | |
---|---|
protected |
RedwoodConfiguration()
Private constructor to prevent use of "new RedwoodConfiguration()" |
Method Summary | |
---|---|
void |
apply()
Apply this configuration to Redwood |
static void |
apply(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(String file)
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(Object[] channels)
Hide the following channels. |
RedwoodConfiguration |
loggingClass(Class<?> classToIgnoreInTraces)
Set a Java class to ignore when printing stack traces |
RedwoodConfiguration |
loggingClass(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(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(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RedwoodConfiguration()
Method Detail |
---|
public void apply()
public RedwoodConfiguration clear()
public RedwoodConfiguration stdout()
public RedwoodConfiguration stderr()
public RedwoodConfiguration console()
public RedwoodConfiguration file(String file)
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 add
public RedwoodConfiguration handler(LogRecordHandler parent, LogRecordHandler child)
parent
- The handler to extendchild
- The new handler to add
public 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 handler
public RedwoodConfiguration loggingClass(String classToIgnoreInTraces)
classToIgnoreInTraces
- The class name (with packages, etc) to ignore.
public RedwoodConfiguration loggingClass(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 channels
public RedwoodConfiguration hideChannels(Object[] channels)
channels
- The names of the channels to hide.
public RedwoodConfiguration showOnlyChannels(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(Properties props)
props
- The properties to use in configuration
public static void apply(Properties props)
props
- The properties to apply
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |