Package com.openhtmltopdf.util
Class XRLog
java.lang.Object
com.openhtmltopdf.util.XRLog
Utility class for using the java.util.logging package. Relies on the standard
configuration for logging, but gives easier access to the various logs
(plumbing.load, .init, .render)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
private static boolean
static final String
static final String
static final String
private static XRLogger
private static Boolean
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XRLogger
private static void
init()
static boolean
Whether logging is on or off.Returns a list of all loggers that will be accessed by XRLog.static void
log
(Level level, LogMessageId.LogMessageId0Param logMessageId) static void
log
(Level level, LogMessageId.LogMessageId0Param logMessageId, Throwable t) static void
log
(Level level, LogMessageId.LogMessageId1Param logMessageId, Object arg) static void
log
(Level level, LogMessageId.LogMessageId1Param logMessageId, Object arg, Throwable throwable) static void
log
(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2) static void
log
(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2, Throwable throwable) static void
log
(Level level, LogMessageId.LogMessageId3Param logMessageId, Object arg1, Object arg2, Object arg3) static void
log
(Level level, LogMessageId.LogMessageId3Param logMessageId, Object arg1, Object arg2, Object arg3, Throwable throwable) static void
log
(Level level, LogMessageId.LogMessageId4Param logMessageId, Object arg1, Object arg2, Object arg3, Object arg4) static void
log
(Level level, LogMessageId.LogMessageId5Param logMessageId, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) private static void
log
(Level level, LogMessageId logMessageId, boolean hasError, Object... args) private static String
registerLoggerByName
(String loggerName) static void
static void
setLoggerImpl
(XRLogger loggerImpl) static void
setLoggingEnabled
(boolean loggingEnabled) Turns logging on or off, without affecting logging configuration.
-
Field Details
-
LOGGER_NAMES
-
CONFIG
-
EXCEPTION
-
GENERAL
-
INIT
-
JUNIT
-
LOAD
-
MATCH
-
CASCADE
-
XML_ENTITIES
-
CSS_PARSE
-
LAYOUT
-
RENDER
-
initPending
private static volatile boolean initPending -
loggerImpl
-
loggingEnabled
-
-
Constructor Details
-
XRLog
public XRLog()
-
-
Method Details
-
registerLoggerByName
-
listRegisteredLoggers
Returns a list of all loggers that will be accessed by XRLog. Each entry is a String with a logger name, which can be used to retrieve the logger using the corresponding Logging API; example name might be "com.openhtmltopdf.render"- Returns:
- List of loggers, never null.
-
log
-
log
-
log
-
log
public static void log(Level level, LogMessageId.LogMessageId1Param logMessageId, Object arg, Throwable throwable) -
log
public static void log(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2) -
log
public static void log(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2, Throwable throwable) -
log
public static void log(Level level, LogMessageId.LogMessageId3Param logMessageId, Object arg1, Object arg2, Object arg3) -
log
-
log
-
log
-
log
-
init
private static void init() -
setLevel
-
isLoggingEnabled
public static boolean isLoggingEnabled()Whether logging is on or off.- Returns:
- Returns true if logging is enabled, false if not. Corresponds to configuration file property xr.util-logging.loggingEnabled, or to value passed to setLoggingEnabled(bool).
-
setLoggingEnabled
public static void setLoggingEnabled(boolean loggingEnabled) Turns logging on or off, without affecting logging configuration.- Parameters:
loggingEnabled
- Flag whether logging is enabled or not; if false, all logging calls fail silently. Corresponds to configuration file property xr.util-logging.loggingEnabled
-
getLoggerImpl
-
setLoggerImpl
-