java.lang.Object
com.thoughtworks.go.plugin.api.logging.Logger

public class Logger extends Object
Logger for use by plugin developers.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    debug(String message)
    Messages to be logged in debug mode.
    void
    debug(String message, Object arg)
    Messages to be logged in debug mode according to the specified format and argument.
    void
    debug(String message, Object... arguments)
    Messages to be logged in debug mode according to the specified format and arguments.
    void
    debug(String message, Object arg1, Object arg2)
    Messages to be logged in debug mode according to the specified format and arguments.
    void
    debug(String message, Throwable throwable)
    Messages to be logged in debug mode.
    void
    error(String message)
    Messages to be logged in error mode.
    void
    error(String message, Object arg)
    Messages to be logged in error mode according to the specified format and argument.
    void
    error(String message, Object... arguments)
    Messages to be logged in error mode according to the specified format and arguments.
    void
    error(String message, Object arg1, Object arg2)
    Messages to be logged in error mode according to the specified format and arguments.
    void
    error(String message, Throwable throwable)
    Messages to be logged in error mode.
    static Logger
    getLoggerFor(Class loggerClass)
     
    static Logger
    getLoggerFor(Class loggerClass, String pluginId)
     
    void
    info(String message)
    Messages to be logged in info mode.
    void
    info(String message, Object arg)
    Messages to be logged in info mode according to the specified format and argument.
    void
    info(String message, Object... arguments)
    Messages to be logged in info mode according to the specified format and arguments.
    void
    info(String message, Object arg1, Object arg2)
    Messages to be logged in info mode according to the specified format and arguments.
    void
    info(String message, Throwable throwable)
    Messages to be logged in info mode.
    static void
    initialize(com.thoughtworks.go.plugin.internal.api.LoggingService loggingService)
     
    void
    warn(String message)
    Messages to be logged in warn mode.
    void
    warn(String message, Object arg)
    Messages to be logged in warn mode according to the specified format and argument.
    void
    warn(String message, Object... arguments)
    Messages to be logged in warn mode according to the specified format and arguments.
    void
    warn(String message, Object arg1, Object arg2)
    Messages to be logged in warn mode according to the specified format and arguments.
    void
    warn(String message, Throwable throwable)
    Messages to be logged in warn mode.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getLoggerFor

      public static Logger getLoggerFor(Class loggerClass)
    • getLoggerFor

      public static Logger getLoggerFor(Class loggerClass, String pluginId)
    • initialize

      public static void initialize(com.thoughtworks.go.plugin.internal.api.LoggingService loggingService)
    • debug

      public void debug(String message)
      Messages to be logged in debug mode.
      Parameters:
      message - a string containing the message to be logged.
    • debug

      public void debug(String message, Throwable throwable)
      Messages to be logged in debug mode.
      Parameters:
      message - a string containing the message to be logged.
      throwable -
    • debug

      public void debug(String message, Object arg)
      Messages to be logged in debug mode according to the specified format and argument.

      This form avoids unnecessary object creation when the logger is disabled for the DEBUG level.

      Parameters:
      message - the format string.
      arg - the argument
    • debug

      public void debug(String message, Object arg1, Object arg2)
      Messages to be logged in debug mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the DEBUG level.

      Parameters:
      message - the format string.
      arg1 - the first argument
      arg2 - the second argument
    • debug

      public void debug(String message, Object... arguments)
      Messages to be logged in debug mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the DEBUG level.

      Parameters:
      message - the format string.
      arguments - a list of 3 or more arguments
    • info

      public void info(String message)
      Messages to be logged in info mode.
      Parameters:
      message - a string containing the message to be logged.
    • info

      public void info(String message, Throwable throwable)
      Messages to be logged in info mode.
      Parameters:
      message - a string containing the message to be logged.
      throwable -
    • info

      public void info(String message, Object arg)
      Messages to be logged in info mode according to the specified format and argument.

      This form avoids unnecessary object creation when the logger is disabled for the INFO level.

      Parameters:
      message - the format string.
      arg - the argument
    • info

      public void info(String message, Object arg1, Object arg2)
      Messages to be logged in info mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the INFO level.

      Parameters:
      message - the format string.
      arg1 - the first argument
      arg2 - the second argument
    • info

      public void info(String message, Object... arguments)
      Messages to be logged in info mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the INFO level.

      Parameters:
      message - the format string.
      arguments - a list of 3 or more arguments
    • warn

      public void warn(String message)
      Messages to be logged in warn mode.
      Parameters:
      message - a string containing the message to be logged.
    • warn

      public void warn(String message, Throwable throwable)
      Messages to be logged in warn mode.
      Parameters:
      message - a string containing the message to be logged.
      throwable -
    • warn

      public void warn(String message, Object arg)
      Messages to be logged in warn mode according to the specified format and argument.

      This form avoids unnecessary object creation when the logger is disabled for the WARN level.

      Parameters:
      message - the format string.
      arg - the argument
    • warn

      public void warn(String message, Object arg1, Object arg2)
      Messages to be logged in warn mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the WARN level.

      Parameters:
      message - the format string.
      arg1 - the first argument
      arg2 - the second argument
    • warn

      public void warn(String message, Object... arguments)
      Messages to be logged in warn mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the WARN level.

      Parameters:
      message - the format string.
      arguments - a list of 3 or more arguments
    • error

      public void error(String message)
      Messages to be logged in error mode.
      Parameters:
      message - a string containing the message to be logged.
    • error

      public void error(String message, Throwable throwable)
      Messages to be logged in error mode.
      Parameters:
      message - a string containing the message to be logged.
      throwable -
    • error

      public void error(String message, Object arg)
      Messages to be logged in error mode according to the specified format and argument.

      This form avoids unnecessary object creation when the logger is disabled for the ERROR level.

      Parameters:
      message - the format string.
      arg - the argument
    • error

      public void error(String message, Object arg1, Object arg2)
      Messages to be logged in error mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the ERROR level.

      Parameters:
      message - the format string.
      arg1 - the first argument
      arg2 - the second argument
    • error

      public void error(String message, Object... arguments)
      Messages to be logged in error mode according to the specified format and arguments.

      This form avoids unnecessary object creation when the logger is disabled for the ERROR level.

      Parameters:
      message - the format string.
      arguments - a list of 3 or more arguments