Class AntMessageLogger

java.lang.Object
org.apache.ivy.util.AbstractMessageLogger
org.apache.ivy.ant.AntMessageLogger
All Implemented Interfaces:
MessageLogger

public class AntMessageLogger extends AbstractMessageLogger
Implementation of the simple message facility for ant.
  • Constructor Details

    • AntMessageLogger

      protected AntMessageLogger(org.apache.tools.ant.ProjectComponent task)
      Constructs a new AntMessageImpl instance.
      Parameters:
      task - the ant project component this message implementation should use for logging. Must not be null.
  • Method Details

    • register

      public static void register(org.apache.tools.ant.ProjectComponent task, Ivy ivy)
      Creates and register an AntMessageLogger for the given Task, with the given Ivy instance.

      The created instance will automatically be unregistered from the Ivy instance when the task finishes.

      Parameters:
      task - the task the logger should use for logging
      ivy - the ivy instance on which the logger should be registered
    • log

      public void log(String msg, int level)
      Description copied from interface: MessageLogger
      Logs a message at the given level.

      level constants are defined in the Message class.

      Parameters:
      msg - the message to log
      level - the level at which the message should be logged.
      See Also:
    • rawlog

      public void rawlog(String msg, int level)
      Description copied from interface: MessageLogger
      Same as MessageLogger.log(String, int), but without adding any contextual information to the message.
      Parameters:
      msg - the message to log
      level - the level at which the message should be logged.
    • doProgress

      public void doProgress()
      Description copied from class: AbstractMessageLogger
      Indicates a progression for a long running task
      Specified by:
      doProgress in class AbstractMessageLogger
    • doEndProgress

      public void doEndProgress(String msg)
      Description copied from class: AbstractMessageLogger
      Indicates the end of a long running task
      Specified by:
      doEndProgress in class AbstractMessageLogger
      Parameters:
      msg - the message associated with long running task end.
    • toString

      public String toString()
      Overrides:
      toString in class Object