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 Detail
-
CONFIG
public static final String CONFIG
-
EXCEPTION
public static final String EXCEPTION
-
GENERAL
public static final String GENERAL
-
INIT
public static final String INIT
-
JUNIT
public static final String JUNIT
-
LOAD
public static final String LOAD
-
MATCH
public static final String MATCH
-
CASCADE
public static final String CASCADE
-
XML_ENTITIES
public static final String XML_ENTITIES
-
CSS_PARSE
public static final String CSS_PARSE
-
LAYOUT
public static final String LAYOUT
-
RENDER
public static final String RENDER
-
-
Method Detail
-
listRegisteredLoggers
public static List<String> 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
public static void cssParse(String msg)
-
xmlEntities
public static void xmlEntities(String msg)
-
cascade
public static void cascade(String msg)
-
exception
public static void exception(String msg)
-
general
public static void general(String msg)
-
init
public static void init(String msg)
-
junit
public static void junit(String msg)
-
load
public static void load(String msg)
-
match
public static void match(String msg)
-
layout
public static void layout(String msg)
-
render
public static void render(String msg)
-
main
public static void main(String[] args)
-
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
public static XRLogger getLoggerImpl()
-
setLoggerImpl
public static void setLoggerImpl(XRLogger loggerImpl)
-
-