Class Logger
- java.lang.Object
-
- org.glassfish.hk2.utilities.reflection.Logger
-
public class Logger extends java.lang.Object
A logger for HK2. Currently implemented over the JDK logger
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
HK2_LOGGER_NAME
private static Logger
INSTANCE
private java.util.logging.Logger
jdkLogger
private static boolean
STDOUT_DEBUG
-
Constructor Summary
Constructors Modifier Constructor Description private
Logger()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(java.lang.String debuggingMessage)
Sends this message to the Debug channel (FINER level in JDK parlance)void
debug(java.lang.String className, java.lang.String methodName, java.lang.Throwable th)
Sends this message to the Debug channel (FINER level in JDK parlance)void
debug(java.lang.String debuggingMessage, java.lang.Throwable th)
Sends this message to the Debug channel (FINER level in JDK parlance)static Logger
getLogger()
Gets the singleton instance of the Loggerstatic void
printThrowable(java.lang.Throwable th)
Prints a throwable to stdoutvoid
warning(java.lang.String warningMessage)
Sends this message to the Debug channel (FINER level in JDK parlance)void
warning(java.lang.String warningMessage, java.lang.Throwable th)
Sends this message to the Debug channel (FINER level in JDK parlance)
-
-
-
Field Detail
-
INSTANCE
private static final Logger INSTANCE
-
HK2_LOGGER_NAME
private static final java.lang.String HK2_LOGGER_NAME
- See Also:
- Constant Field Values
-
STDOUT_DEBUG
private static final boolean STDOUT_DEBUG
-
jdkLogger
private final java.util.logging.Logger jdkLogger
-
-
Method Detail
-
getLogger
public static Logger getLogger()
Gets the singleton instance of the Logger- Returns:
- The singleton logger instance (will not return null)
-
debug
public void debug(java.lang.String debuggingMessage)
Sends this message to the Debug channel (FINER level in JDK parlance)- Parameters:
debuggingMessage
- The non-null message to log to the debug logger
-
debug
public void debug(java.lang.String debuggingMessage, java.lang.Throwable th)
Sends this message to the Debug channel (FINER level in JDK parlance)- Parameters:
debuggingMessage
- The non-null message to log to the debug logger
-
warning
public void warning(java.lang.String warningMessage)
Sends this message to the Debug channel (FINER level in JDK parlance)- Parameters:
warningMessage
- The non-null message to log to the debug logger
-
warning
public void warning(java.lang.String warningMessage, java.lang.Throwable th)
Sends this message to the Debug channel (FINER level in JDK parlance)- Parameters:
warningMessage
- The non-null message to log to the debug logger
-
printThrowable
public static void printThrowable(java.lang.Throwable th)
Prints a throwable to stdout- Parameters:
th
- The throwable to print
-
debug
public void debug(java.lang.String className, java.lang.String methodName, java.lang.Throwable th)
Sends this message to the Debug channel (FINER level in JDK parlance)- Parameters:
className
- The name of the class where this was thrownmethodName
- The name of the method where this was thrownth
- The exception to log
-
-