Class BambooLogger

java.lang.Object
com.atlassian.bamboo.utils.BambooLogger

@Deprecated @Internal public class BambooLogger extends Object
Deprecated.
use log4j 2 logger (Logger) instead
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 Details

    • 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.
    • fatal

      public void fatal(String message, Throwable t)
      Deprecated.
    • fatal

      public void fatal(String messageFormat, Object... messageArgs)
      Deprecated.
    • fatal

      public void fatal(Supplier<String> messageSupplier)
      Deprecated.
    • error

      public void error(String message)
      Deprecated.
    • error

      public void error(String message, Throwable t)
      Deprecated.
    • error

      public void error(String messageFormat, Object... messageArgs)
      Deprecated.
    • error

      public void error(Supplier<String> messageSupplier)
      Deprecated.
    • warn

      public void warn(String message)
      Deprecated.
    • warn

      public void warn(String message, Throwable t)
      Deprecated.
    • warn

      public void warn(String messageFormat, Object... messageArgs)
      Deprecated.
    • warn

      public void warn(Supplier<String> messageSupplier)
      Deprecated.
    • info

      public void info(String message)
      Deprecated.
    • info

      public void info(String message, Throwable t)
      Deprecated.
    • info

      public void info(String messageFormat, Object... messageArgs)
      Deprecated.
    • info

      public void info(Supplier<String> messageSupplier)
      Deprecated.
    • debug

      public void debug(String message)
      Deprecated.
    • debug

      public void debug(String message, Throwable t)
      Deprecated.
    • debug

      public void debug(String messageFormat, Object... messageArgs)
      Deprecated.
    • debug

      public void debug(Supplier<String> messageSupplier)
      Deprecated.
    • trace

      public void trace(String message)
      Deprecated.
    • trace

      public void trace(String message, Throwable t)
      Deprecated.
    • trace

      public void trace(String messageFormat, Object... messageArgs)
      Deprecated.
    • trace

      public void trace(Supplier<String> messageSupplier)
      Deprecated.