Class ExtendedLogger
- java.lang.Object
-
- org.glassfish.jersey.internal.util.ExtendedLogger
-
public final class ExtendedLogger extends Object
Logger extension with additional logging utility & convenience methods.- Author:
- Marek Potociar
-
-
Constructor Summary
Constructors Constructor Description ExtendedLogger(Logger logger, Level debugLevel)Create new logger extension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHandler(Handler handler)voidconfig(String msg)voiddebugLog(String message)Log a debug message using the configured debug level.voiddebugLog(String messageTemplate, Object... args)Log a debug message using the configured debug level.voidentering(String sourceClass, String sourceMethod)voidentering(String sourceClass, String sourceMethod, Object param1)voidentering(String sourceClass, String sourceMethod, Object[] params)booleanequals(Object obj)voidexiting(String sourceClass, String sourceMethod)voidexiting(String sourceClass, String sourceMethod, Object result)voidfine(String msg)voidfiner(String msg)voidfinest(String msg)LevelgetDebugLevel()Get the configured debug level.FiltergetFilter()Handler[]getHandlers()LevelgetLevel()StringgetName()LoggergetParent()ResourceBundlegetResourceBundle()StringgetResourceBundleName()booleangetUseParentHandlers()inthashCode()voidinfo(String msg)booleanisDebugLoggable()Check if the debug level is loggable.booleanisLoggable(Level level)voidlog(Level level, String msg)voidlog(Level level, String msg, Object param1)voidlog(Level level, String msg, Object[] params)voidlog(Level level, String msg, Throwable thrown)voidlog(LogRecord record)voidlogp(Level level, String sourceClass, String sourceMethod, String msg)voidlogp(Level level, String sourceClass, String sourceMethod, String msg, Object param1)voidlogp(Level level, String sourceClass, String sourceMethod, String msg, Object[] params)voidlogp(Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object param1)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object[] params)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Throwable thrown)voidremoveHandler(Handler handler)voidsetFilter(Filter newFilter)voidsetLevel(Level newLevel)voidsetParent(Logger parent)voidsetUseParentHandlers(boolean useParentHandlers)voidsevere(String msg)voidthrowing(String sourceClass, String sourceMethod, Throwable thrown)StringtoString()voidwarning(String msg)
-
-
-
Method Detail
-
isDebugLoggable
public boolean isDebugLoggable()
Check if the debug level is loggable.- Returns:
trueif the debug level is loggable,falseotherwise.
-
getDebugLevel
public Level getDebugLevel()
Get the configured debug level.- Returns:
- configured debug level.
-
debugLog
public void debugLog(String message)
Log a debug message using the configured debug level. This method appends thread name information to the end of the logged message.- Parameters:
message- debug message.
-
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- debug message template.args- message template parameters.
-
warning
public void warning(String msg)
-
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)
-
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)
-
config
public void config(String msg)
-
addHandler
public void addHandler(Handler handler) throws SecurityException
- Throws:
SecurityException
-
-