org.glassfish.jersey.internal.util
Class ExtendedLogger

java.lang.Object
  extended by org.glassfish.jersey.internal.util.ExtendedLogger

public final class ExtendedLogger
extends Object

Logger extension with additional logging utility & convenience methods.

Author:
Marek Potociar (marek.potociar at oracle.com)

Constructor Summary
ExtendedLogger(Logger logger, Level debugLevel)
           
 
Method Summary
 void addHandler(Handler handler)
           
 void config(String msg)
           
 void debugLog(String messageTemplate, Object... args)
          Log a debug message using the configured debug level.
 void entering(String sourceClass, String sourceMethod)
           
 void entering(String sourceClass, String sourceMethod, Object param1)
           
 void entering(String sourceClass, String sourceMethod, Object[] params)
           
 boolean equals(Object obj)
           
 void exiting(String sourceClass, String sourceMethod)
           
 void exiting(String sourceClass, String sourceMethod, Object result)
           
 void fine(String msg)
           
 void finer(String msg)
           
 void finest(String msg)
           
 Level getDebugLevel()
          Get the configured debug level.
 Filter getFilter()
           
 Handler[] getHandlers()
           
 Level getLevel()
           
 String getName()
           
 Logger getParent()
           
 ResourceBundle getResourceBundle()
           
 String getResourceBundleName()
           
 boolean getUseParentHandlers()
           
 int hashCode()
           
 void info(String msg)
           
 boolean isDebugLoggable()
          Check if the debug level is loggable.
 boolean isLoggable(Level level)
           
 void log(Level level, String msg)
           
 void log(Level level, String msg, Object param1)
           
 void log(Level level, String msg, Object[] params)
           
 void log(Level level, String msg, Throwable thrown)
           
 void log(LogRecord record)
           
 void logp(Level level, String sourceClass, String sourceMethod, String msg)
           
 void logp(Level level, String sourceClass, String sourceMethod, String msg, Object param1)
           
 void logp(Level level, String sourceClass, String sourceMethod, String msg, Object[] params)
           
 void logp(Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown)
           
 void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg)
           
 void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object param1)
           
 void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object[] params)
           
 void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Throwable thrown)
           
 void removeHandler(Handler handler)
           
 void setFilter(Filter newFilter)
           
 void setLevel(Level newLevel)
           
 void setParent(Logger parent)
           
 void setUseParentHandlers(boolean useParentHandlers)
           
 void severe(String msg)
           
 void throwing(String sourceClass, String sourceMethod, Throwable thrown)
           
 String toString()
           
 void warning(String msg)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedLogger

public ExtendedLogger(Logger logger,
                      Level debugLevel)
Method Detail

isDebugLoggable

public boolean isDebugLoggable()
Check if the debug level is loggable.

Returns:
true if the debug level is loggable, false otherwise.

getDebugLevel

public Level getDebugLevel()
Get the configured debug level.

Returns:
configured debug level.

debugLog

public void debugLog(String messageTemplate,
                     Object... args)
Log a debug message using the configured debug level. This method appends thread name information to the end of the logged message.

Parameters:
messageTemplate -
args -

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

warning

public void warning(String msg)

throwing

public void throwing(String sourceClass,
                     String sourceMethod,
                     Throwable thrown)

severe

public void severe(String msg)

setUseParentHandlers

public void setUseParentHandlers(boolean useParentHandlers)

setParent

public void setParent(Logger parent)

setLevel

public void setLevel(Level newLevel)
              throws SecurityException
Throws:
SecurityException

setFilter

public void setFilter(Filter newFilter)
               throws SecurityException
Throws:
SecurityException

removeHandler

public void removeHandler(Handler handler)
                   throws SecurityException
Throws:
SecurityException

logrb

public void logrb(Level level,
                  String sourceClass,
                  String sourceMethod,
                  String bundleName,
                  String msg,
                  Throwable thrown)

logrb

public void logrb(Level level,
                  String sourceClass,
                  String sourceMethod,
                  String bundleName,
                  String msg,
                  Object[] params)

logrb

public void logrb(Level level,
                  String sourceClass,
                  String sourceMethod,
                  String bundleName,
                  String msg,
                  Object param1)

logrb

public void logrb(Level level,
                  String sourceClass,
                  String sourceMethod,
                  String bundleName,
                  String msg)

logp

public void logp(Level level,
                 String sourceClass,
                 String sourceMethod,
                 String msg,
                 Throwable thrown)

logp

public void logp(Level level,
                 String sourceClass,
                 String sourceMethod,
                 String msg,
                 Object[] params)

logp

public void logp(Level level,
                 String sourceClass,
                 String sourceMethod,
                 String msg,
                 Object param1)

logp

public void logp(Level level,
                 String sourceClass,
                 String sourceMethod,
                 String msg)

log

public void log(Level level,
                String msg,
                Throwable thrown)

log

public void log(Level level,
                String msg,
                Object[] params)

log

public void log(Level level,
                String msg,
                Object param1)

log

public void log(Level level,
                String msg)

log

public void log(LogRecord record)

isLoggable

public boolean isLoggable(Level level)

info

public void info(String msg)

getUseParentHandlers

public boolean getUseParentHandlers()

getResourceBundleName

public String getResourceBundleName()

getResourceBundle

public ResourceBundle getResourceBundle()

getParent

public Logger getParent()

getName

public String getName()

getLevel

public Level getLevel()

getHandlers

public Handler[] getHandlers()

getFilter

public Filter getFilter()

finest

public void finest(String msg)

finer

public void finer(String msg)

fine

public void fine(String msg)

exiting

public void exiting(String sourceClass,
                    String sourceMethod,
                    Object result)

exiting

public void exiting(String sourceClass,
                    String sourceMethod)

entering

public void entering(String sourceClass,
                     String sourceMethod,
                     Object[] params)

entering

public void entering(String sourceClass,
                     String sourceMethod,
                     Object param1)

entering

public void entering(String sourceClass,
                     String sourceMethod)

config

public void config(String msg)

addHandler

public void addHandler(Handler handler)
                throws SecurityException
Throws:
SecurityException


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.