|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectSimpleLog
public final class SimpleLog
A logging class with the following features:
| Field Summary | |
|---|---|
boolean |
always_traceback
Always provide a backtrace (traceback) when calling log. |
boolean |
enabled
If false, do no output. |
String |
indent_str
The current indentation string. |
String |
indent_str_one_level
Indentation string for one level of indentation. |
boolean |
line_oriented
True if every log call is made with a complete line of text. |
PrintStream |
logfile
Where to write logging output. |
Stack<Long> |
start_times
|
| Constructor Summary | |
|---|---|
SimpleLog()
|
|
SimpleLog(boolean enabled)
|
|
SimpleLog(boolean enabled,
boolean always_traceback)
|
|
SimpleLog(String filename,
boolean enabled)
|
|
| Method Summary | |
|---|---|
void |
clear()
Clears indent and start times and then pushes one start time |
void |
clear(String format,
Object... args)
Calls clear() and then logs the specified message |
boolean |
enabled()
|
void |
exdent_time(String format,
Object... args)
Prints the time and then exdents. |
void |
exdent()
|
void |
exdent(String format,
Object... args)
Deprecated. Use separate calls to exdent() and
log(String, Object...). |
void |
indent()
|
void |
indent(String format,
Object... args)
|
void |
log_tb(String format,
Object... args)
Log a message, and provide a backtrace (traceback, or tb). |
void |
log_time(String format,
Object... args)
Writes the specified message and the elapsed time since the last call to start_time(). |
void |
log(String format,
Object... args)
Log a message. |
void |
pop_start_time()
|
void |
push_start_time()
Push a new start time onto the stack. |
void |
reset_start_time()
This overwrites the current start time; it does not push a new one!! |
void |
start_time()
Deprecated. Use reset_start_time(). |
void |
tb()
Print a backtrace (traceback, or tb) to the log. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean enabled
public PrintStream logfile
public String indent_str
public String indent_str_one_level
public boolean always_traceback
public boolean line_oriented
public Stack<Long> start_times
| Constructor Detail |
|---|
public SimpleLog(boolean enabled,
boolean always_traceback)
public SimpleLog(boolean enabled)
public SimpleLog()
public SimpleLog(String filename,
boolean enabled)
| Method Detail |
|---|
public final boolean enabled()
public final void log(String format,
Object... args)
public final void log_tb(String format,
Object... args)
public final void tb()
public final void indent()
public final void indent(String format,
Object... args)
public final void clear()
public final void clear(String format,
Object... args)
public final void exdent()
@Deprecated
public final void exdent(String format,
Object... args)
exdent() and
log(String, Object...).
public final void exdent_time(String format,
Object... args)
@Deprecated public final void start_time()
reset_start_time().
public final void reset_start_time()
public final void push_start_time()
public final void pop_start_time()
public final void log_time(String format,
Object... args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||