org.apache.openejb.util
Class Logger

java.lang.Object
  extended by org.apache.openejb.util.Logger

public class Logger
extends Object


Constructor Summary
Logger(LogCategory category, LogStream logStream, String baseName)
           
 
Method Summary
 String debug(String message)
          If this level is enabled, then it finds a message for the given key and logs it
 String debug(String message, Object... args)
           
 String debug(String message, Throwable t)
           
 String debug(String message, Throwable t, Object... args)
           
 String error(String message)
           
 String error(String message, Object... args)
           
 String error(String message, Throwable t)
           
 String error(String message, Throwable t, Object... args)
           
 String fatal(String message)
           
 String fatal(String message, Object... args)
           
 String fatal(String message, Throwable t)
           
 String fatal(String message, Throwable t, Object... args)
           
 Logger getChildLogger(String child)
           
static Logger getInstance(LogCategory category, Class clazz)
           
static Logger getInstance(LogCategory category, String baseName)
          Finds a Logger from the cache and returns it.
 String info(String message)
           
 String info(String message, Object... args)
           
 String info(String message, Throwable t)
           
 String info(String message, Throwable t, Object... args)
           
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isFatalEnabled()
           
 boolean isInfoEnabled()
           
 boolean isWarningEnabled()
           
 String warning(String message)
           
 String warning(String message, Object... args)
           
 String warning(String message, Throwable t)
           
 String warning(String message, Throwable t, Object... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger(LogCategory category,
              LogStream logStream,
              String baseName)
Method Detail

getInstance

public static Logger getInstance(LogCategory category,
                                 String baseName)
Finds a Logger from the cache and returns it. If not found in cache then builds a Logger and returns it.

Parameters:
category - - The category of the logger
baseName - - The baseName for the ResourceBundle
Returns:
Logger

getInstance

public static Logger getInstance(LogCategory category,
                                 Class clazz)

getChildLogger

public Logger getChildLogger(String child)

isDebugEnabled

public boolean isDebugEnabled()

isErrorEnabled

public boolean isErrorEnabled()

isFatalEnabled

public boolean isFatalEnabled()

isInfoEnabled

public boolean isInfoEnabled()

isWarningEnabled

public boolean isWarningEnabled()

debug

public String debug(String message)
If this level is enabled, then it finds a message for the given key and logs it

Parameters:
message - - This could be a plain message or a key in Messages.properties
Returns:
the formatted i18n message

debug

public String debug(String message,
                    Object... args)

debug

public String debug(String message,
                    Throwable t)

debug

public String debug(String message,
                    Throwable t,
                    Object... args)

error

public String error(String message)

error

public String error(String message,
                    Object... args)

error

public String error(String message,
                    Throwable t)

error

public String error(String message,
                    Throwable t,
                    Object... args)

fatal

public String fatal(String message)

fatal

public String fatal(String message,
                    Object... args)

fatal

public String fatal(String message,
                    Throwable t)

fatal

public String fatal(String message,
                    Throwable t,
                    Object... args)

info

public String info(String message)

info

public String info(String message,
                   Object... args)

info

public String info(String message,
                   Throwable t)

info

public String info(String message,
                   Throwable t,
                   Object... args)

warning

public String warning(String message)

warning

public String warning(String message,
                      Object... args)

warning

public String warning(String message,
                      Throwable t)

warning

public String warning(String message,
                      Throwable t,
                      Object... args)


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.