Apache CXF API

org.apache.cxf.common.logging
Class LogUtils

java.lang.Object
  extended by org.apache.cxf.common.logging.LogUtils

public final class LogUtils
extends java.lang.Object

A container for static utility methods related to logging.


Method Summary
protected static java.util.logging.Logger createLogger(java.lang.Class<?> cls, java.lang.String name)
          Create a logger
static java.util.logging.Logger getL7dLogger(java.lang.Class<?> cls)
          Get a Logger with the associated default resource bundle for the class.
static java.util.logging.Logger getL7dLogger(java.lang.Class<?> cls, java.lang.String name)
          Get a Logger with an associated resource bundle.
static void log(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String message)
          Checks log level and logs
static void log(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String message, java.lang.Object parameter)
          Checks log level and logs
static void log(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String message, java.lang.Object[] parameters)
          Checks log level and logs
static void log(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String message, java.lang.Throwable throwable)
          Checks log level and logs
static void log(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... parameters)
          Allows both parameter substitution and a typed Throwable to be logged.
static void log(java.util.logging.Logger logger, java.util.logging.Level level, java.lang.String message, java.lang.Throwable throwable, java.lang.Object parameter)
          Allows both parameter substitution and a typed Throwable to be logged.
static void setLoggerClass(java.lang.Class<?> cls)
          Enable users to use their own logger implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setLoggerClass

public static void setLoggerClass(java.lang.Class<?> cls)
Enable users to use their own logger implementation.


getL7dLogger

public static java.util.logging.Logger getL7dLogger(java.lang.Class<?> cls)
Get a Logger with the associated default resource bundle for the class.

Parameters:
cls - the Class to contain the Logger
Returns:
an appropriate Logger

getL7dLogger

public static java.util.logging.Logger getL7dLogger(java.lang.Class<?> cls,
                                                    java.lang.String name)
Get a Logger with an associated resource bundle.

Parameters:
cls - the Class to contain the Logger
name - the resource name
Returns:
an appropriate Logger

createLogger

protected static java.util.logging.Logger createLogger(java.lang.Class<?> cls,
                                                       java.lang.String name)
Create a logger


log

public static void log(java.util.logging.Logger logger,
                       java.util.logging.Level level,
                       java.lang.String message,
                       java.lang.Throwable throwable,
                       java.lang.Object parameter)
Allows both parameter substitution and a typed Throwable to be logged.

Parameters:
logger - the Logger the log to
level - the severity level
message - the log message
throwable - the Throwable to log
parameter - the parameter to substitute into message

log

public static void log(java.util.logging.Logger logger,
                       java.util.logging.Level level,
                       java.lang.String message,
                       java.lang.Throwable throwable,
                       java.lang.Object... parameters)
Allows both parameter substitution and a typed Throwable to be logged.

Parameters:
logger - the Logger the log to
level - the severity level
message - the log message
throwable - the Throwable to log
parameters - the parameters to substitute into message

log

public static void log(java.util.logging.Logger logger,
                       java.util.logging.Level level,
                       java.lang.String message)
Checks log level and logs

Parameters:
logger - the Logger the log to
level - the severity level
message - the log message

log

public static void log(java.util.logging.Logger logger,
                       java.util.logging.Level level,
                       java.lang.String message,
                       java.lang.Throwable throwable)
Checks log level and logs

Parameters:
logger - the Logger the log to
level - the severity level
message - the log message
throwable - the Throwable to log

log

public static void log(java.util.logging.Logger logger,
                       java.util.logging.Level level,
                       java.lang.String message,
                       java.lang.Object parameter)
Checks log level and logs

Parameters:
logger - the Logger the log to
level - the severity level
message - the log message
parameter - the parameter to substitute into message

log

public static void log(java.util.logging.Logger logger,
                       java.util.logging.Level level,
                       java.lang.String message,
                       java.lang.Object[] parameters)
Checks log level and logs

Parameters:
logger - the Logger the log to
level - the severity level
message - the log message
parameters - the parameters to substitute into message

Apache CXF API

Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.