Logger
public class JavaUtilLog extends AbstractLogger
Implementation of Jetty Logger
based on Logger
.
You can also set the logger level using standard java.util.logging configuration.
Configuration Properties:LEVEL_ALL, LEVEL_DEBUG, LEVEL_DEFAULT, LEVEL_INFO, LEVEL_OFF, LEVEL_WARN
Constructor | Description |
---|---|
JavaUtilLog() |
|
JavaUtilLog(java.lang.String name) |
Modifier and Type | Method | Description |
---|---|---|
void |
debug(java.lang.String msg,
long arg) |
Formats and logs at debug level.
|
void |
debug(java.lang.String msg,
java.lang.Object... args) |
Formats and logs at debug level.
|
void |
debug(java.lang.String msg,
java.lang.Throwable thrown) |
Logs the given message at debug level, with Throwable information.
|
void |
debug(java.lang.Throwable thrown) |
Logs the given Throwable information at debug level
|
java.lang.String |
getName() |
|
void |
ignore(java.lang.Throwable ignored) |
Ignore an exception.
|
void |
info(java.lang.String msg,
java.lang.Object... args) |
Formats and logs at info level.
|
void |
info(java.lang.String msg,
java.lang.Throwable thrown) |
Logs the given message at info level, with Throwable information.
|
void |
info(java.lang.Throwable thrown) |
Logs the given Throwable information at info level
|
boolean |
isDebugEnabled() |
|
protected void |
log(java.util.logging.Level level,
java.lang.String msg,
java.lang.Throwable thrown) |
|
protected Logger |
newLogger(java.lang.String fullname) |
Create a Child Logger of this Logger.
|
void |
setDebugEnabled(boolean enabled) |
Mutator used to turn debug on programmatically.
|
void |
warn(java.lang.String msg,
java.lang.Object... args) |
Formats and logs at warn level.
|
void |
warn(java.lang.String msg,
java.lang.Throwable thrown) |
Logs the given message at warn level, with Throwable information.
|
void |
warn(java.lang.Throwable thrown) |
Logs the given Throwable information at warn level
|
condensePackageString, getLevelId, getLogger, getLoggingProperty, lookupLoggingLevel
public JavaUtilLog()
public JavaUtilLog(java.lang.String name)
public java.lang.String getName()
protected void log(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable thrown)
public void warn(java.lang.String msg, java.lang.Object... args)
Logger
msg
- the formatting stringargs
- the optional argumentspublic void warn(java.lang.Throwable thrown)
Logger
thrown
- the Throwable to logpublic void warn(java.lang.String msg, java.lang.Throwable thrown)
Logger
msg
- the message to logthrown
- the Throwable to logpublic void info(java.lang.String msg, java.lang.Object... args)
Logger
msg
- the formatting stringargs
- the optional argumentspublic void info(java.lang.Throwable thrown)
Logger
thrown
- the Throwable to logpublic void info(java.lang.String msg, java.lang.Throwable thrown)
Logger
msg
- the message to logthrown
- the Throwable to logpublic boolean isDebugEnabled()
public void setDebugEnabled(boolean enabled)
Logger
enabled
- whether to enable the debug levelpublic void debug(java.lang.String msg, java.lang.Object... args)
Logger
msg
- the formatting stringargs
- the optional argumentspublic void debug(java.lang.String msg, long arg)
Logger
debug
in interface Logger
debug
in class AbstractLogger
msg
- the formatting stringarg
- long valuepublic void debug(java.lang.Throwable thrown)
Logger
thrown
- the Throwable to logpublic void debug(java.lang.String msg, java.lang.Throwable thrown)
Logger
msg
- the message to logthrown
- the Throwable to logprotected Logger newLogger(java.lang.String fullname)
newLogger
in class AbstractLogger
public void ignore(java.lang.Throwable ignored)
Logger
This should be used rather than an empty catch block.
ignored
- the throwable to log as ignoredCopyright © 1995–2017 Webtide. All rights reserved.