Package org.eclipse.sisu.inject
Class Logs
java.lang.Object
org.eclipse.sisu.inject.Logs
Utility methods for dealing with container logging and recovery.
Set -Dsisu.debug to send detailed tracing to the console.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
catchThrowable
(Throwable problem) Helper method for catchingThrowable
s; severe errors such asThreadDeath
are always re-thrown.static void
Logs a debug message; uses "{}" format anchors.static String
identityToString
(Object object) Returns an identity string for the given object.static void
throwUnchecked
(Throwable problem) Helper method for throwingThrowable
s; checked exceptions are wrapped asProvisionException
s.static String
toString
(com.google.inject.Injector injector) Returns a string representation of the givenInjector
.static String
toString
(com.google.inject.Module module) Returns a string representation of the givenModule
.static void
Logs a trace message; uses "{}" format anchors.static void
Logs a warning message; uses "{}" format anchors.
-
Field Details
-
NEW_LINE
-
TRACE_ENABLED
public static final boolean TRACE_ENABLED -
DEBUG_ENABLED
public static final boolean DEBUG_ENABLED
-
-
Method Details
-
trace
Logs a trace message; uses "{}" format anchors. PassThrowable
s in last parameter for special handling.- Parameters:
format
- The trace message formatarg1
- First object to formatarg2
- Second object to format
-
debug
Logs a debug message; uses "{}" format anchors. PassThrowable
s in last parameter for special handling.- Parameters:
format
- The trace message formatarg1
- First object to formatarg2
- Second object to format
-
warn
Logs a warning message; uses "{}" format anchors. PassThrowable
s in last parameter for special handling.- Parameters:
format
- The warning message formatarg1
- First object to formatarg2
- Second object to format
-
catchThrowable
Helper method for catchingThrowable
s; severe errors such asThreadDeath
are always re-thrown.- Parameters:
problem
- The problem
-
throwUnchecked
Helper method for throwingThrowable
s; checked exceptions are wrapped asProvisionException
s.- Parameters:
problem
- The problem
-
identityToString
Returns an identity string for the given object.- Parameters:
object
- The object- Returns:
- Identity string of the object.
- See Also:
-
toString
Returns a string representation of the givenModule
.- Parameters:
module
- The module- Returns:
- String representation of the module.
-
toString
Returns a string representation of the givenInjector
.- Parameters:
injector
- The injector- Returns:
- String representation of the injector.
-