Top Description Fields Constructors Methods
com.openhtmltopdf.util

public Class JDKXRLogger

extends Object
implements XRLogger
Class Inheritance
All Implemented Interfaces
com.openhtmltopdf.util.XRLogger
Imports
java.util.HashMap, .Map, .Arrays, java.util.logging.Level, .Logger, .Handler, .ConsoleHandler, .Formatter

An XRLogger interface that uses java.util.logging. https://github.com/danfickle/openhtmltopdf/wiki/Logging

Field Summary

Modifier and TypeField and Description
private final Formatter
private final Handler
private volatile boolean
private final Level
private volatile Map<String, Logger>
private final boolean

Constructor Summary

AccessConstructor and Description
public
public
JDKXRLogger(boolean useParent, Level level, Handler handler, Formatter formatter)

Method Summary

Modifier and TypeMethod and Description
private void
private void
configureLoggerHandlerForwarding(boolean useParentHandlers)

private void
private void
private Logger

Returns:

The logger value
getLogger
(String
PARAM
log
)

Same purpose as Logger.getLogger(), except that the static initialization for XRLog will initialize the LogManager with logging levels and other configuration.

private void
init(boolean useParent, Level level, Handler handler, Formatter formatter)

private void
initializeJDKLogManager(boolean useParent, Level level, Handler handler, Formatter formatter)

public boolean
public void
public void
private Map<String, Logger>
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.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

formatterback to summary
private final Formatter formatter
handlerback to summary
private final Handler handler
initPendingback to summary
private volatile boolean initPending
levelback to summary
private final Level level
loggersback to summary
private volatile Map<String, Logger> loggers
useParentback to summary
private final boolean useParent

Constructor Detail

JDKXRLoggerback to summary
public JDKXRLogger()
JDKXRLoggerback to summary
public JDKXRLogger(boolean useParent, Level level, Handler handler, Formatter formatter)

Method Detail

checkInitPendingback to summary
private void checkInitPending()
configureLoggerHandlerForwardingback to summary
private void configureLoggerHandlerForwarding(boolean useParentHandlers)
configureLogHandlersback to summary
private void configureLogHandlers(Handler handler, Formatter formatter)
configureLogLevelsback to summary
private void configureLogLevels(Level level)
getLoggerback to summary
private Logger getLogger(String log)

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:String

PARAM

Returns:Logger

The logger value

initback to summary
private void init(boolean useParent, Level level, Handler handler, Formatter formatter)
initializeJDKLogManagerback to summary
private void initializeJDKLogManager(boolean useParent, Level level, Handler handler, Formatter formatter)
isLogLevelEnabledback to summary
public boolean isLogLevelEnabled(Diagnostic diagnostic)

Implements com.openhtmltopdf.util.XRLogger.isLogLevelEnabled.

Annotations
@Override
logback to summary
public void log(String where, Level level, String msg)

Implements com.openhtmltopdf.util.XRLogger.log.

Annotations
@Override
logback to summary
public void log(String where, Level level, String msg, Throwable th)

Implements com.openhtmltopdf.util.XRLogger.log.

Annotations
@Override
retrieveLoggersback to summary
private Map<String, Logger> 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.

setLevelback to summary
public void setLevel(String logger, Level level)

Implements com.openhtmltopdf.util.XRLogger.setLevel.

Annotations
@Override