public final class Logs
extends java.lang.Object
Set -Dsisu.debug to send detailed tracing to the console.
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Logs.ConsoleSink
Logs.Sinks messages to the system console. |
(package private) static class |
Logs.JULSink
Logs.Sinks messages to the JDK. |
private static interface |
Logs.Sink
Something that accepts formatted messages.
|
(package private) static class |
Logs.SLF4JSink
Logs.Sinks messages via SLF4J. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NEW_LINE |
private static Logs.Sink |
SINK |
private static java.lang.String |
SISU |
static boolean |
TRACE_ENABLED |
| Modifier | Constructor and Description |
|---|---|
private |
Logs() |
| Modifier and Type | Method and Description |
|---|---|
static void |
catchThrowable(java.lang.Throwable problem)
Helper method for catching
Throwables; severe errors such as ThreadDeath are always re-thrown. |
private static java.lang.String |
format(java.lang.String format,
java.lang.Object arg)
Replaces the first available formatting anchor with the given object.
|
static java.lang.String |
identityToString(java.lang.Object object)
Returns an identity string for the given object.
|
static void |
throwUnchecked(java.lang.Throwable problem)
Helper method for throwing
Throwables; checked exceptions are wrapped as ProvisionExceptions. |
static java.lang.String |
toString(com.google.inject.Injector injector)
Returns a string representation of the given
Injector. |
static java.lang.String |
toString(com.google.inject.Module module)
Returns a string representation of the given
Module. |
static void |
trace(java.lang.String format,
java.lang.Object arg1,
java.lang.Object arg2)
Logs a trace message; uses "{}" format anchors.
|
static void |
warn(java.lang.String format,
java.lang.Object arg1,
java.lang.Object arg2)
Logs a warning message; uses "{}" format anchors.
|
public static final java.lang.String NEW_LINE
private static final java.lang.String SISU
private static final Logs.Sink SINK
public static final boolean TRACE_ENABLED
public static void trace(java.lang.String format,
java.lang.Object arg1,
java.lang.Object arg2)
Throwables in last parameter for special handling.format - The trace message formatarg1 - First object to formatarg2 - Second object to formatpublic static void warn(java.lang.String format,
java.lang.Object arg1,
java.lang.Object arg2)
Throwables in last parameter for special handling.format - The warning message formatarg1 - First object to formatarg2 - Second object to formatpublic static void catchThrowable(java.lang.Throwable problem)
Throwables; severe errors such as ThreadDeath are always re-thrown.problem - The problempublic static void throwUnchecked(java.lang.Throwable problem)
Throwables; checked exceptions are wrapped as ProvisionExceptions.problem - The problempublic static java.lang.String identityToString(java.lang.Object object)
object - The objectSystem.identityHashCode(Object)public static java.lang.String toString(com.google.inject.Module module)
Module.module - The modulepublic static java.lang.String toString(com.google.inject.Injector injector)
Injector.injector - The injectorprivate static java.lang.String format(java.lang.String format,
java.lang.Object arg)
format - The format stringarg - The object to format