Package com.openhtmltopdf.util
Class JDKXRLogger
java.lang.Object
com.openhtmltopdf.util.JDKXRLogger
- All Implemented Interfaces:
XRLogger
An
XRLogger
interface that uses java.util.logging
.
https://github.com/danfickle/openhtmltopdf/wiki/Logging-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJDKXRLogger
(boolean useParent, Level level, Handler handler, Formatter formatter) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
configureLoggerHandlerForwarding
(boolean useParentHandlers) private void
configureLogHandlers
(Handler handler, Formatter formatter) private void
configureLogLevels
(Level level) private Logger
Same purpose as Logger.getLogger(), except that the static initialization for XRLog will initialize the LogManager with logging levels and other configuration.private void
private void
initializeJDKLogManager
(boolean useParent, Level level, Handler handler, Formatter formatter) boolean
isLogLevelEnabled
(Diagnostic diagnostic) void
void
Returns a List of all Logger instances used by this project from the JDK LogManager; these will be automatically created if they aren't already available.void
-
Field Details
-
initPending
private volatile boolean initPending -
loggers
-
useParent
private final boolean useParent -
level
-
handler
-
formatter
-
-
Constructor Details
-
JDKXRLogger
public JDKXRLogger() -
JDKXRLogger
-
-
Method Details
-
checkInitPending
private void checkInitPending() -
isLogLevelEnabled
- Specified by:
isLogLevelEnabled
in interfaceXRLogger
-
log
-
log
-
setLevel
-
getLogger
Same purpose as Logger.getLogger(), except that the static initialization for XRLog will initialize the LogManager with logging levels and other configuration. Use this instead of Logger.getLogger()- Parameters:
log
- PARAM- Returns:
- The logger value
-
init
-
initializeJDKLogManager
-
configureLoggerHandlerForwarding
private void configureLoggerHandlerForwarding(boolean useParentHandlers) -
retrieveLoggers
Returns a List of all Logger instances used by this project from the JDK LogManager; these will be automatically created if they aren't already available. -
configureLogHandlers
-
configureLogLevels
-