public class LogNode extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static boolean |
LOG_IN_REALTIME |
If this is set to true, log entries are output in realtime, as well as added to the LogNode tree.
|
| Constructor | Description |
|---|---|
LogNode() |
Create a toplevel log node.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addElapsedTime() |
Call this once the work corresponding with a given log entry has completed if you want to show the time taken
after the log entry.
|
void |
flush() |
Flush out the log to stderr, and clear the log contents.
|
LogNode |
log(String msg) |
Add a log entry.
|
LogNode |
log(String msg,
long elapsedTimeNanos) |
Add a log entry.
|
LogNode |
log(String msg,
long elapsedTimeNanos,
Throwable e) |
Add a log entry.
|
LogNode |
log(String sortKey,
String msg) |
Add a log entry with sort key for deterministic ordering.
|
LogNode |
log(String sortKey,
String msg,
long elapsedTimeNanos) |
Add a log entry with sort key for deterministic ordering.
|
LogNode |
log(String sortKey,
String msg,
long elapsedTimeNanos,
Throwable e) |
Add a log entry with sort key for deterministic ordering.
|
LogNode |
log(String sortKey,
String msg,
Throwable e) |
Add a log entry with sort key for deterministic ordering.
|
LogNode |
log(String msg,
Throwable e) |
Add a log entry.
|
LogNode |
log(Throwable e) |
Add a log entry.
|
LogNode |
log(List<String> msgs) |
Add a series of log entries.
|
String |
toString() |
Build the log output.
|
public static boolean LOG_IN_REALTIME
public String toString()
public void addElapsedTime()
public LogNode log(String sortKey, String msg, long elapsedTimeNanos, Throwable e)
sortKey - The sort key for the log entry.msg - The message.elapsedTimeNanos - The elapsed time.e - The Throwable that was thrown.public LogNode log(String sortKey, String msg, long elapsedTimeNanos)
sortKey - The sort key for the log entry.msg - The message.elapsedTimeNanos - The elapsed time.public LogNode log(String sortKey, String msg, Throwable e)
sortKey - The sort key for the log entry.msg - The message.e - The Throwable that was thrown.public LogNode log(String sortKey, String msg)
sortKey - The sort key for the log entry.msg - The message.public LogNode log(String msg, long elapsedTimeNanos, Throwable e)
msg - The message.elapsedTimeNanos - The elapsed time.e - The Throwable that was thrown.public LogNode log(String msg, long elapsedTimeNanos)
msg - The message.elapsedTimeNanos - The elapsed time.public LogNode log(String msg, Throwable e)
msg - The message.e - The Throwable that was thrown.public LogNode log(String msg)
msg - The message.public LogNode log(List<String> msgs)
msgs - The messages.public LogNode log(Throwable e)
e - The Throwable that was thrown.public void flush()
Copyright © 2018. All rights reserved.