Top Description Fields Constructors Methods
com.openhtmltopdf.util

public Class XRLog

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, java.util.logging.Level

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

Modifier and TypeField and Description
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
private static volatile boolean
public static final String
public static final String
public static final String
private static final List<String>
private static volatile XRLogger
private static volatile Boolean
public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static synchronized XRLogger
private static void
init()

public static boolean

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).
isLoggingEnabled
()

Whether logging is on or off.

public static List<String>

Returns:

List of loggers, never null.
listRegisteredLoggers
()

Returns a list of all loggers that will be accessed by XRLog.

public static void
public static void
public static void
log(Level level, LogMessageId.LogMessageId1Param logMessageId, Object arg)

public static void
log(Level level, LogMessageId.LogMessageId1Param logMessageId, Object arg, Throwable throwable)

public static void
log(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2)

public static void
log(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2, Throwable throwable)

public static void
log(Level level, LogMessageId.LogMessageId3Param logMessageId, Object arg1, Object arg2, Object arg3)

public static void
log(Level level, LogMessageId.LogMessageId3Param logMessageId, Object arg1, Object arg2, Object arg3, Throwable throwable)

public static void
log(Level level, LogMessageId.LogMessageId4Param logMessageId, Object arg1, Object arg2, Object arg3, Object arg4)

public 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(final String loggerName)

public static synchronized void
setLevel(String log, Level level)

public static synchronized void
setLoggerImpl(XRLogger loggerImpl)

public static void
setLoggingEnabled(boolean
Flag whether logging is enabled or not; if false, all logging calls fail silently. Corresponds to configuration file property xr.util-logging.loggingEnabled
loggingEnabled
)

Turns logging on or off, without affecting logging configuration.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CASCADEback to summary
public static final String CASCADE
CONFIGback to summary
public static final String CONFIG
CSS_PARSEback to summary
public static final String CSS_PARSE
EXCEPTIONback to summary
public static final String EXCEPTION
GENERALback to summary
public static final String GENERAL
INITback to summary
public static final String INIT
initPendingback to summary
private static volatile boolean initPending
JUNITback to summary
public static final String JUNIT
LAYOUTback to summary
public static final String LAYOUT
LOADback to summary
public static final String LOAD
LOGGER_NAMESback to summary
private static final List<String> LOGGER_NAMES
loggerImplback to summary
private static volatile XRLogger loggerImpl
loggingEnabledback to summary
private static volatile Boolean loggingEnabled
MATCHback to summary
public static final String MATCH
RENDERback to summary
public static final String RENDER
XML_ENTITIESback to summary
public static final String XML_ENTITIES

Constructor Detail

XRLogback to summary
public XRLog()

Method Detail

getLoggerImplback to summary
public static synchronized XRLogger getLoggerImpl()
initback to summary
private static void init()
isLoggingEnabledback to summary
public static boolean isLoggingEnabled()

Whether logging is on or off.

Returns:boolean

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).

listRegisteredLoggersback to summary
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 "com.openhtmltopdf.render"

Returns:List<String>

List of loggers, never null.

logback to summary
public static void log(Level level, LogMessageId.LogMessageId0Param logMessageId)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId0Param logMessageId, Throwable t)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId1Param logMessageId, Object arg)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId1Param logMessageId, Object arg, Throwable throwable)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId2Param logMessageId, Object arg1, Object arg2, Throwable throwable)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId3Param logMessageId, Object arg1, Object arg2, Object arg3)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId3Param logMessageId, Object arg1, Object arg2, Object arg3, Throwable throwable)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId4Param logMessageId, Object arg1, Object arg2, Object arg3, Object arg4)
logback to summary
public static void log(Level level, LogMessageId.LogMessageId5Param logMessageId, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
logback to summary
private static void log(Level level, LogMessageId logMessageId, boolean hasError, Object... args)
registerLoggerByNameback to summary
private static String registerLoggerByName(final String loggerName)
setLevelback to summary
public static synchronized void setLevel(String log, Level level)
setLoggerImplback to summary
public static synchronized void setLoggerImpl(XRLogger loggerImpl)
setLoggingEnabledback to summary
public static void setLoggingEnabled(boolean loggingEnabled)

Turns logging on or off, without affecting logging configuration.

Parameters
loggingEnabled:boolean

Flag whether logging is enabled or not; if false, all logging calls fail silently. Corresponds to configuration file property xr.util-logging.loggingEnabled