Class LogTrigger

  • All Implemented Interfaces:
    java.util.EventListener, IvyListener, Trigger

    public class LogTrigger
    extends AbstractTrigger
    A trigger performing logging.

    The implementation is widely inspired by Ant Echo task.

    • Constructor Detail

      • LogTrigger

        public LogTrigger()
    • Method Detail

      • progress

        public void progress​(IvyEvent event)
      • log

        protected void log​(java.lang.String message)
        Logs the given message.
        Parameters:
        message - the message to log
      • setMessage

        public void setMessage​(java.lang.String msg)
        Message to write.
        Parameters:
        msg - Sets the value for the message variable.
      • setFile

        public void setFile​(java.io.File file)
        File to write to.
        Parameters:
        file - the file to write to, if not set, echo to standard Ivy logging
      • setAppend

        public void setAppend​(boolean append)
        If true, append to existing file.
        Parameters:
        append - if true, append to existing file, default is false.
      • setEncoding

        public void setEncoding​(java.lang.String encoding)
        Declare the encoding to use when outputting to a file; Use "" for the platform's default encoding.
        Parameters:
        encoding - the character encoding to use.