Class XRLog

java.lang.Object
org.xhtmlrenderer.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)
  • Field Details

    • LOGGER_NAMES

      private static final List<String> LOGGER_NAMES
    • 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
    • loggerImpl

      private static XRLogger loggerImpl
    • loggingEnabled

      private static boolean loggingEnabled
  • Constructor Details

    • XRLog

      public XRLog()
  • Method Details

    • registerLoggerByName

      private static String registerLoggerByName(String loggerName)
    • listRegisteredLoggers

      @CheckReturnValue 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)
    • cssParse

      public static void cssParse(Level level, String msg)
    • cssParse

      public static void cssParse(Level level, String msg, Throwable th)
    • xmlEntities

      public static void xmlEntities(String msg)
    • xmlEntities

      public static void xmlEntities(Level level, String msg)
    • xmlEntities

      public static void xmlEntities(Level level, String msg, Throwable th)
    • cascade

      public static void cascade(String msg)
    • cascade

      public static void cascade(Level level, String msg)
    • cascade

      public static void cascade(Level level, String msg, Throwable th)
    • exception

      public static void exception(String msg)
    • exception

      public static void exception(String msg, @Nullable Throwable th)
    • general

      public static void general(String msg)
    • general

      public static void general(Level level, String msg)
    • general

      public static void general(Level level, String msg, Throwable th)
    • init

      public static void init(String msg)
    • init

      public static void init(Level level, String msg)
    • init

      public static void init(Level level, String msg, Throwable th)
    • junit

      public static void junit(String msg)
    • junit

      public static void junit(Level level, String msg)
    • junit

      public static void junit(Level level, String msg, Throwable th)
    • load

      public static void load(String msg)
    • load

      public static void load(Level level, String msg)
    • load

      public static void load(Level level, String msg, Throwable th)
    • match

      public static void match(String msg)
    • match

      public static void match(Level level, String msg)
    • match

      public static void match(Level level, String msg, Throwable th)
    • layout

      public static void layout(String msg)
    • layout

      public static void layout(Level level, String msg)
    • layout

      public static void layout(Level level, String msg, Throwable th)
    • render

      public static void render(String msg)
    • render

      public static void render(Level level, String msg)
    • render

      public static void render(Level level, String msg, Throwable th)
    • log

      public static void log(String where, Level level, String msg)
    • log

      public static void log(String where, Level level, String msg, @Nullable Throwable th)
    • setLevel

      public static void setLevel(String log, Level level)
    • isLoggingEnabled

      @CheckReturnValue 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

      @CheckReturnValue public static XRLogger getLoggerImpl()
    • setLoggerImpl

      public static void setLoggerImpl(XRLogger loggerImpl)