Class PluginLogger

java.lang.Object
io.jenkins.plugins.util.PluginLogger

public class PluginLogger extends Object
A simple logger that prefixes each message with the name of a plugin.
Author:
Ullrich Hafner
  • Constructor Details

    • PluginLogger

      public PluginLogger(PrintStream logger, String pluginName)
      Creates a new PluginLogger.
      Parameters:
      logger - the logger to create
      pluginName - the name of the plugin
  • Method Details

    • log

      @FormatMethod public void log(String format, Object... args)
      Logs the specified message.
      Parameters:
      format - A format string
      args - Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
    • logEachLine

      public void logEachLine(Collection<String> lines)
      Logs the specified messages.
      Parameters:
      lines - the messages to log