|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.util.logging.Redwood.Util
public static class Redwood.Util
A utility class for Redwood intended for static import (import static edu.stanford.nlp.util.logging.Redwood.Util.*;), providing a wrapper for Redwood functions and adding utility shortcuts
Field Summary | |
---|---|
static Color |
BLACK
|
static Style |
BLINK
|
static Color |
BLUE
|
static Style |
BOLD
|
static Style |
CROSS_OUT
|
static Color |
CYAN
|
static Redwood.Flag |
DBG
|
static Style |
DIM
|
static Redwood.Flag |
ERR
|
static Redwood.Flag |
FORCE
|
static Color |
GREEN
|
static Style |
ITALIC
|
static Color |
MAGENTA
|
static Color |
RED
|
static Redwood.Flag |
STDERR
|
static Redwood.Flag |
STDOUT
|
static Style |
UNDERLINE
|
static Redwood.Flag |
WARN
|
static Color |
WHITE
|
static Color |
YELLOW
|
Constructor Summary | |
---|---|
Redwood.Util()
|
Method Summary | ||
---|---|---|
static void |
debug(Object... objs)
|
|
protected static void |
dontPrintChannels()
Do not print a margin with the channels corresponding to a log entry. |
|
static void |
end_track()
|
|
static void |
end_Track(String check)
|
|
static void |
endThreads(String check)
|
|
static void |
endTrack()
|
|
static void |
endTrack(String check)
|
|
static void |
err(Object... objs)
|
|
static void |
exit()
|
|
static void |
exit(int exitCode)
|
|
static RuntimeException |
fail()
|
|
static RuntimeException |
fail(Object msg)
|
|
static void |
finishThread()
|
|
static void |
force_track(String title)
|
|
static void |
forceTrack(String title)
|
|
static void |
log(Object... objs)
|
|
static void |
logf(String format,
Object... args)
|
|
static void |
prettyLog(Object obj)
|
|
static void |
prettyLog(String description,
Object obj)
|
|
protected static void |
printChannels()
Print (to console) a margin with the channels of a given log message. |
|
static void |
printChannels(int width)
Print (to console) a margin with the channels of a given log message. |
|
static void |
println(Object o)
|
|
static void |
start_track(Object... objs)
|
|
static void |
startThreads(String title)
|
|
static void |
startTrack(Object... objs)
|
|
static
|
thread(Iterable<R> runnables)
|
|
static
|
thread(String title,
Iterable<R> runnables)
Wrap a collection of threads (Runnables) to be logged by Redwood. |
|
static
|
threadAndRun(Iterable<R> runnables)
|
|
static
|
threadAndRun(Iterable<R> runnables,
int numThreads)
|
|
static
|
threadAndRun(String title,
Iterable<R> runnables)
|
|
static
|
threadAndRun(String title,
Iterable<R> runnables,
int numThreads)
Thread a collection of runnables, and run them via a java Executor. |
|
static void |
warn(Object... objs)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Redwood.Flag ERR
public static final Redwood.Flag WARN
public static final Redwood.Flag DBG
public static final Redwood.Flag FORCE
public static final Redwood.Flag STDOUT
public static final Redwood.Flag STDERR
public static Style BOLD
public static Style DIM
public static Style ITALIC
public static Style UNDERLINE
public static Style BLINK
public static Style CROSS_OUT
public static Color BLACK
public static Color RED
public static Color GREEN
public static Color YELLOW
public static Color BLUE
public static Color MAGENTA
public static Color CYAN
public static Color WHITE
Constructor Detail |
---|
public Redwood.Util()
Method Detail |
---|
public static void prettyLog(Object obj)
public static void prettyLog(String description, Object obj)
public static void log(Object... objs)
public static void logf(String format, Object... args)
public static void warn(Object... objs)
public static void debug(Object... objs)
public static void err(Object... objs)
public static void println(Object o)
public static void exit(int exitCode)
public static void exit()
public static RuntimeException fail(Object msg)
public static RuntimeException fail()
public static void startTrack(Object... objs)
public static void start_track(Object... objs)
public static void forceTrack(String title)
public static void force_track(String title)
public static void endTrack(String check)
public static void end_Track(String check)
public static void endTrack()
public static void end_track()
public static void startThreads(String title)
public static void finishThread()
public static void endThreads(String check)
public static <R extends Runnable> ArrayList<Runnable> thread(String title, Iterable<R> runnables)
R
- The class of the Runnables being passedtitle
- A title for the group of threads being runrunnables
- The Runnables representing the tasks being run, without the Redwood overhead
public static <R extends Runnable> ArrayList<Runnable> thread(Iterable<R> runnables)
public static <R extends Runnable> void threadAndRun(String title, Iterable<R> runnables, int numThreads)
R
- The class of the Runnables being passedtitle
- A title for the group of threads being runrunnables
- The Runnables representing the tasks being run, without the Redwood overhead --
particularly, these should NOT have been passed to thread() yet.numThreads
- The number of threads to run onpublic static <R extends Runnable> void threadAndRun(String title, Iterable<R> runnables)
public static <R extends Runnable> void threadAndRun(Iterable<R> runnables, int numThreads)
public static <R extends Runnable> void threadAndRun(Iterable<R> runnables)
public static void printChannels(int width)
width
- The width of the margin to print (must be >2)protected static void printChannels()
protected static void dontPrintChannels()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |