org.xhtmlrenderer.util
Class XRLog

java.lang.Object
  extended by 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)

Author:
empty

Field Summary
static String CASCADE
           
static String CONFIG
           
static String CSS_PARSE
           
static String EXCEPTION
           
static String GENERAL
           
static String INIT
           
static String JUNIT
           
static String LAYOUT
           
static String LOAD
           
static String MATCH
           
static String RENDER
           
static String XML_ENTITIES
           
 
Constructor Summary
XRLog()
           
 
Method Summary
static void cascade(Level level, String msg)
           
static void cascade(Level level, String msg, Throwable th)
           
static void cascade(String msg)
           
static void cssParse(Level level, String msg)
           
static void cssParse(Level level, String msg, Throwable th)
           
static void cssParse(String msg)
           
static void exception(String msg)
           
static void exception(String msg, Throwable th)
           
static void general(Level level, String msg)
           
static void general(Level level, String msg, Throwable th)
           
static void general(String msg)
           
static XRLogger getLoggerImpl()
           
static void init(Level level, String msg)
           
static void init(Level level, String msg, Throwable th)
           
static void init(String msg)
           
static boolean isLoggingEnabled()
          Whether logging is on or off.
static void junit(Level level, String msg)
           
static void junit(Level level, String msg, Throwable th)
           
static void junit(String msg)
           
static void layout(Level level, String msg)
           
static void layout(Level level, String msg, Throwable th)
           
static void layout(String msg)
           
static List listRegisteredLoggers()
          Returns a list of all loggers that will be accessed by XRLog.
static void load(Level level, String msg)
           
static void load(Level level, String msg, Throwable th)
           
static void load(String msg)
           
static void log(String where, Level level, String msg)
           
static void log(String where, Level level, String msg, Throwable th)
           
static void main(String[] args)
           
static void match(Level level, String msg)
           
static void match(Level level, String msg, Throwable th)
           
static void match(String msg)
           
static void render(Level level, String msg)
           
static void render(Level level, String msg, Throwable th)
           
static void render(String msg)
           
static void setLevel(String log, Level level)
           
static void setLoggerImpl(XRLogger loggerImpl)
           
static void setLoggingEnabled(boolean loggingEnabled)
          Turns logging on or off, without affecting logging configuration.
static void xmlEntities(Level level, String msg)
           
static void xmlEntities(Level level, String msg, Throwable th)
           
static void xmlEntities(String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

XRLog

public XRLog()
Method Detail

listRegisteredLoggers

public static List 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,
                             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,
                       Throwable th)

main

public static void main(String[] args)

setLevel

public static void setLevel(String log,
                            Level level)

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)


Copyright © 2013. All Rights Reserved.