Package com.atlassian.bamboo.utils
Class BambooLogger
java.lang.Object
com.atlassian.bamboo.utils.BambooLogger
Deprecated.
A logger which may be used instead of the Log4j's
Logger
for a few syntax improvements, mostly focused on
lazy evaluation of log messages.
For example, these typical Log4j calls which aim to avoid eager evaluation of log messages:
if (log.isDebugEnabled()) {
log.debug(String.format("Task %s completed in %d seconds", taskId, duration));
}
if (log.isTraceEnabled()) {
log.trace("User " + getUser() + " does not have access to " + getEntity());
}
...can be replaced with the following shortcut methods for lazy evaluation of
String.format(String, Object...)
or Supplier
:
log.debug("Task %s completed in %d seconds", taskId, duration));
log.trace(() -> "User " + getUser() + " does not have access to " + getEntity());
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.static BambooLogger
Deprecated.Creates a new logger for the given class.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.
-
Method Details
-
getLogger
Deprecated.Creates a new logger for the given class.- See Also:
-
Logger.getLogger(Class)
-
fatal
Deprecated. -
fatal
Deprecated. -
fatal
Deprecated. -
fatal
Deprecated. -
error
Deprecated. -
error
Deprecated. -
error
Deprecated. -
error
Deprecated. -
warn
Deprecated. -
warn
Deprecated. -
warn
Deprecated. -
warn
Deprecated. -
info
Deprecated. -
info
Deprecated. -
info
Deprecated. -
info
Deprecated. -
debug
Deprecated. -
debug
Deprecated. -
debug
Deprecated. -
debug
Deprecated. -
trace
Deprecated. -
trace
Deprecated. -
trace
Deprecated. -
trace
Deprecated.
-
Logger
) instead