Package com.atlassian.bamboo.utils
Class BambooLogger
- java.lang.Object
-
- com.atlassian.bamboo.utils.BambooLogger
-
@Deprecated @Internal public class BambooLogger extends Object
Deprecated.use log4j 2 logger (Logger
) insteadA logger which may be used instead of the Log4j'sLogger
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...)
orSupplier
:log.debug("Task %s completed in %d seconds", taskId, duration)); log.trace(() -> "User " + getUser() + " does not have access to " + getEntity());
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
debug(String message)
Deprecated.void
debug(String messageFormat, Object... messageArgs)
Deprecated.void
debug(String message, Throwable t)
Deprecated.void
debug(Supplier<String> messageSupplier)
Deprecated.void
error(String message)
Deprecated.void
error(String messageFormat, Object... messageArgs)
Deprecated.void
error(String message, Throwable t)
Deprecated.void
error(Supplier<String> messageSupplier)
Deprecated.void
fatal(String message)
Deprecated.void
fatal(String messageFormat, Object... messageArgs)
Deprecated.void
fatal(String message, Throwable t)
Deprecated.void
fatal(Supplier<String> messageSupplier)
Deprecated.static BambooLogger
getLogger(Class<?> clazz)
Deprecated.Creates a new logger for the given class.void
info(String message)
Deprecated.void
info(String messageFormat, Object... messageArgs)
Deprecated.void
info(String message, Throwable t)
Deprecated.void
info(Supplier<String> messageSupplier)
Deprecated.void
trace(String message)
Deprecated.void
trace(String messageFormat, Object... messageArgs)
Deprecated.void
trace(String message, Throwable t)
Deprecated.void
trace(Supplier<String> messageSupplier)
Deprecated.void
warn(String message)
Deprecated.void
warn(String messageFormat, Object... messageArgs)
Deprecated.void
warn(String message, Throwable t)
Deprecated.void
warn(Supplier<String> messageSupplier)
Deprecated.
-
-
-
Method Detail
-
getLogger
public static BambooLogger getLogger(Class<?> clazz)
Deprecated.Creates a new logger for the given class.- See Also:
Logger.getLogger(Class)
-
fatal
public void fatal(String message)
Deprecated.
-
error
public void error(String message)
Deprecated.
-
warn
public void warn(String message)
Deprecated.
-
info
public void info(String message)
Deprecated.
-
debug
public void debug(String message)
Deprecated.
-
trace
public void trace(String message)
Deprecated.
-
-