public abstract class Log
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Log.LogStr |
static interface |
Log.Tag
Tags for log messages
|
static class |
Log.Wrapper |
Modifier and Type | Field and Description |
---|---|
static boolean |
_dontDie |
static Log.Tag.Kind[] |
KINDS |
static Key |
LOG_KEY
Key for the log in the KV store
|
static long |
PID
Some guess at the process ID.
|
static Log.Tag.Sys[] |
SYSS |
Constructor and Description |
---|
Log() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(Log.Tag.Sys t,
java.lang.Object... objects)
Log a debug message to the log file and the store if the subsystem's flag is set.
|
static void |
debug(java.lang.Object... objects)
Log a debug message to the log file and the store if the subsystem's flag is set.
|
static void |
die(java.lang.String s) |
static void |
err(Log.Tag.Sys t,
java.lang.String msg)
Record a message to the log file and store.
|
static <T extends java.lang.Throwable> |
err(Log.Tag.Sys t,
java.lang.String msg,
T exception)
Record an exception to the log file and store.
|
static <T extends java.lang.Throwable> |
err(Log.Tag.Sys t,
T exception)
Record an exception to the log file and store.
|
static void |
err(java.lang.String msg)
Record a message to the log file and store.
|
static <T extends java.lang.Throwable> |
err(java.lang.String msg,
T exception)
Record an exception to the log file and store.
|
static <T extends java.lang.Throwable> |
err(T exception)
Record an exception to the log file and store.
|
static java.lang.RuntimeException |
errRTExcept(java.lang.Throwable exception)
Record an exception to the log file and store and return a new
RuntimeException that wraps around the exception.
|
static java.lang.String |
fixedLength(java.lang.String s,
int length) |
static boolean |
flag(Log.Tag.Sys t)
Check if a subsystem will print debug message to the LOG file
|
static java.lang.String |
getLogDir() |
static java.lang.String |
getLogPathFileName() |
static void |
info_no_stdout(Log.Tag.Sys t,
java.lang.Object... objects)
Log an information message to standard out, the log file and the store.
|
static void |
info_no_stdout(java.lang.Object... objects)
Log an information message to standard out, the log file and the store.
|
static void |
info(Log.Tag.Sys t,
java.lang.Object... objects)
Log an information message to standard out, the log file and the store.
|
static void |
info(java.lang.Object... objects)
Log an information message to standard out, the log file and the store.
|
static void |
log(java.io.File file,
java.io.PrintStream stream) |
static void |
main(java.lang.String[] args) |
static java.lang.String |
padRight(java.lang.String stringToPad,
int size) |
static void |
POST(int n,
java.lang.Exception e) |
static void |
POST(int n,
java.lang.String s)
POST stands for "Power on self test".
|
static void |
setFlag(Log.Tag.Sys t)
Set the debug flag.
|
static void |
tmp(java.lang.Object... objects)
Temporary log statement.
|
static void |
unsetFlag(Log.Tag.Sys t)
Unset the debug flag.
|
static java.io.PrintStream |
unwrap(java.io.PrintStream stream) |
static void |
unwrap(java.io.PrintStream stream,
java.lang.String s)
Print a message to the stream without the logging information.
|
static java.lang.Throwable |
warn(Log.Tag.Sys t,
java.lang.String msg)
Log a warning to standard out, the log file and the store.
|
static <T extends java.lang.Throwable> |
warn(Log.Tag.Sys t,
java.lang.String msg,
T exception)
Log a warning to standard out, the log file and the store.
|
static java.lang.Throwable |
warn(java.lang.String msg)
Log a warning to standard out, the log file and the store.
|
static void |
wrap() |
public static final Log.Tag.Kind[] KINDS
public static final Log.Tag.Sys[] SYSS
public static final Key LOG_KEY
public static final long PID
public static boolean _dontDie
public static void wrap()
public static boolean flag(Log.Tag.Sys t)
public static void setFlag(Log.Tag.Sys t)
public static void unsetFlag(Log.Tag.Sys t)
public static java.lang.String getLogDir()
public static java.lang.String getLogPathFileName()
public static <T extends java.lang.Throwable> T err(Log.Tag.Sys t, java.lang.String msg, T exception)
public static void err(Log.Tag.Sys t, java.lang.String msg)
public static <T extends java.lang.Throwable> T err(java.lang.String msg, T exception)
public static void err(java.lang.String msg)
public static <T extends java.lang.Throwable> T err(Log.Tag.Sys t, T exception)
public static <T extends java.lang.Throwable> T err(T exception)
public static java.lang.RuntimeException errRTExcept(java.lang.Throwable exception)
public static <T extends java.lang.Throwable> T warn(Log.Tag.Sys t, java.lang.String msg, T exception)
public static java.lang.Throwable warn(Log.Tag.Sys t, java.lang.String msg)
public static java.lang.Throwable warn(java.lang.String msg)
public static void info_no_stdout(Log.Tag.Sys t, java.lang.Object... objects)
public static void info(Log.Tag.Sys t, java.lang.Object... objects)
public static void info_no_stdout(java.lang.Object... objects)
public static void info(java.lang.Object... objects)
public static void debug(java.lang.Object... objects)
public static void debug(Log.Tag.Sys t, java.lang.Object... objects)
public static void tmp(java.lang.Object... objects)
public static java.lang.String fixedLength(java.lang.String s, int length)
public static java.lang.String padRight(java.lang.String stringToPad, int size)
public static void die(java.lang.String s)
public static void unwrap(java.io.PrintStream stream, java.lang.String s)
public static java.io.PrintStream unwrap(java.io.PrintStream stream)
public static void log(java.io.File file, java.io.PrintStream stream) throws java.lang.Exception
java.lang.Exception
public static void POST(int n, java.lang.String s)
n
- POST code.s
- String to emit.public static void POST(int n, java.lang.Exception e)
public static void main(java.lang.String[] args)