Top Description Fields Constructors Methods
org.glassfish.hk2.utilities.reflection

public Class Logger

extends Object
Class Inheritance
Imports
java.security.AccessController, .PrivilegedAction, java.util.logging.Level

A logger for HK2. Currently implemented over the JDK logger
Author
jwells

Field Summary

Modifier and TypeField and Description
private static final String
private static final Logger
private final Logger
private static final boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
debug(String
The non-null message to log to the debug logger
debuggingMessage
)

Sends this message to the Debug channel (FINER level in JDK parlance)

public void
debug(String
The non-null message to log to the debug logger
debuggingMessage
,
Throwable th)

Sends this message to the Debug channel (FINER level in JDK parlance)

public void
debug(String
The name of the class where this was thrown
className
,
String
The name of the method where this was thrown
methodName
,
Throwable
The exception to log
th
)

Sends this message to the Debug channel (FINER level in JDK parlance)

public static Logger

Returns:

The singleton logger instance (will not return null)
getLogger
()

Gets the singleton instance of the Logger

public static void
printThrowable(Throwable
The throwable to print
th
)

Prints a throwable to stdout

public void
warning(String
The non-null message to log to the debug logger
warningMessage
)

Sends this message to the Debug channel (FINER level in JDK parlance)

public void
warning(String
The non-null message to log to the debug logger
warningMessage
,
Throwable th)

Sends this message to the Debug channel (FINER level in JDK parlance)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HK2_LOGGER_NAMEback to summary
private static final String HK2_LOGGER_NAME
INSTANCEback to summary
private static final Logger INSTANCE
jdkLoggerback to summary
private final Logger jdkLogger
STDOUT_DEBUGback to summary
private static final boolean STDOUT_DEBUG

Constructor Detail

Loggerback to summary
private Logger()

Method Detail

debugback to summary
public void debug(String debuggingMessage)

Sends this message to the Debug channel (FINER level in JDK parlance)

Parameters
debuggingMessage:String

The non-null message to log to the debug logger

debugback to summary
public void debug(String debuggingMessage, Throwable th)

Sends this message to the Debug channel (FINER level in JDK parlance)

Parameters
debuggingMessage:String

The non-null message to log to the debug logger

debugback to summary
public void debug(String className, String methodName, Throwable th)

Sends this message to the Debug channel (FINER level in JDK parlance)

Parameters
className:String

The name of the class where this was thrown

methodName:String

The name of the method where this was thrown

th:Throwable

The exception to log

getLoggerback to summary
public static Logger getLogger()

Gets the singleton instance of the Logger

Returns:Logger

The singleton logger instance (will not return null)

printThrowableback to summary
public static void printThrowable(Throwable th)

Prints a throwable to stdout

Parameters
th:Throwable

The throwable to print

warningback to summary
public void warning(String warningMessage)

Sends this message to the Debug channel (FINER level in JDK parlance)

Parameters
warningMessage:String

The non-null message to log to the debug logger

warningback to summary
public void warning(String warningMessage, Throwable th)

Sends this message to the Debug channel (FINER level in JDK parlance)

Parameters
warningMessage:String

The non-null message to log to the debug logger