Package com.openhtmltopdf.util
Class XRLog
java.lang.Object
com.openhtmltopdf.util.XRLog
public class XRLog extends Object
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)
- Author:
- empty
-
Field Summary
Fields Modifier and Type Field Description static StringCASCADEstatic StringCONFIGstatic StringCSS_PARSEstatic StringEXCEPTIONstatic StringGENERALstatic StringINITstatic StringJUNITstatic StringLAYOUTstatic StringLOADstatic StringMATCHstatic StringRENDERstatic StringXML_ENTITIES -
Constructor Summary
Constructors Constructor Description XRLog() -
Method Summary
Modifier and Type Method Description static voidcascade(String msg)static voidcascade(Level level, String msg)static voidcascade(Level level, String msg, Throwable th)static voidcssParse(String msg)static voidcssParse(Level level, String msg)static voidcssParse(Level level, String msg, Throwable th)static voidexception(String msg)static voidexception(String msg, Throwable th)static voidgeneral(String msg)static voidgeneral(Level level, String msg)static voidgeneral(Level level, String msg, Throwable th)static XRLoggergetLoggerImpl()static voidinit(String msg)static voidinit(Level level, String msg)static voidinit(Level level, String msg, Throwable th)static booleanisLoggingEnabled()Whether logging is on or off.static voidjunit(String msg)static voidjunit(Level level, String msg)static voidjunit(Level level, String msg, Throwable th)static voidlayout(String msg)static voidlayout(Level level, String msg)static voidlayout(Level level, String msg, Throwable th)static List<String>listRegisteredLoggers()Returns a list of all loggers that will be accessed by XRLog.static voidload(String msg)static voidload(Level level, String msg)static voidload(Level level, String msg, Throwable th)static voidlog(String where, Level level, String msg)static voidlog(String where, Level level, String msg, Throwable th)static voidmain(String[] args)static voidmatch(String msg)static voidmatch(Level level, String msg)static voidmatch(Level level, String msg, Throwable th)static voidrender(String msg)static voidrender(Level level, String msg)static voidrender(Level level, String msg, Throwable th)static voidsetLevel(String log, Level level)static voidsetLoggerImpl(XRLogger loggerImpl)static voidsetLoggingEnabled(boolean loggingEnabled)Turns logging on or off, without affecting logging configuration.static voidxmlEntities(String msg)static voidxmlEntities(Level level, String msg)static voidxmlEntities(Level level, String msg, Throwable th)
-
Field Details
-
Constructor Details
-
XRLog
public XRLog()
-
-
Method Details
-
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 "org.xhtmlrenderer.config"- Returns:
- List of loggers, never null.
-
cssParse
-
cssParse
-
cssParse
-
xmlEntities
-
xmlEntities
-
xmlEntities
-
cascade
-
cascade
-
cascade
-
exception
-
exception
-
general
-
general
-
general
-
init
-
init
-
init
-
junit
-
junit
-
junit
-
load
-
load
-
load
-
match
-
match
-
match
-
layout
-
layout
-
layout
-
render
-
render
-
render
-
log
-
log
-
main
-
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
-