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 voidprivate voidconfigureLoggerHandlerForwarding(boolean useParentHandlers) private voidconfigureLogHandlers(Handler handler, Formatter formatter) private voidconfigureLogLevels(Level level) private LoggerSame purpose as Logger.getLogger(), except that the static initialization for XRLog will initialize the LogManager with logging levels and other configuration.private voidprivate voidinitializeJDKLogManager(boolean useParent, Level level, Handler handler, Formatter formatter) booleanisLogLevelEnabled(Diagnostic diagnostic) voidvoidReturns 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:
isLogLevelEnabledin 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
-