Package org.xhtmlrenderer.util
Class JDKXRLogger
java.lang.Object
org.xhtmlrenderer.util.JDKXRLogger
- All Implemented Interfaces:
XRLogger
An
XRLogger
interface that uses java.util.logging
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
private static void
configureLoggerHandlerForwarding
(Properties fsLoggingProperties, List<Logger> loggers) configureLogHandlers
(List<Logger> loggers, String handlerClassList) For each logger provided, assigns the logger an instance of the named log output handlers.private static void
configureLogLevel
(String loggerName, String levelValue) Parses the levelValue into a Level instance and assigns to the Logger instance named by loggerName; if the levelValue is invalid (e.g.private static Logger
Same purpose as Logger.getLogger(), except that the static initialization for XRLog will initialize the LogManager with logging levels and other configuration.private static void
init()
private static void
initializeJDKLogManager
(Properties fsLoggingProperties) void
void
Returns a List of all Logger instances used by Flying Saucer from the JDK LogManager; these will be automatically created if they aren't already available.private static Properties
void
-
Field Details
-
initPending
private static boolean initPending
-
-
Constructor Details
-
JDKXRLogger
public JDKXRLogger()
-
-
Method Details
-
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() -
init
private static void init() -
retrieveLoggingProperties
-
initializeJDKLogManager
-
configureLoggerHandlerForwarding
private static void configureLoggerHandlerForwarding(Properties fsLoggingProperties, List<Logger> loggers) -
assignFormatter
-
retrieveLoggers
Returns a List of all Logger instances used by Flying Saucer from the JDK LogManager; these will be automatically created if they aren't already available. -
configureLogHandlers
private static Map<String,Handler> configureLogHandlers(List<Logger> loggers, String handlerClassList) For each logger provided, assigns the logger an instance of the named log output handlers. Will attempt to instantiate each handler; any which can't be instantiated will cause the method to throw a RuntimeException.- Parameters:
loggers
- List of Logger instances.handlerClassList
- A space-separated string (following the configuration convention for JDK logging configuration files, for handlers) of FQN of log handlers.- Returns:
- Map of handler class names to handler instances.
-
configureLogLevel
Parses the levelValue into a Level instance and assigns to the Logger instance named by loggerName; if the levelValue is invalid (e.g. misspelled), assigns Level.OFF to the logger.
-