org.apache.ivy.plugins.trigger

## Class LogTrigger

- java.lang.Object
- - org.apache.ivy.plugins.trigger.AbstractTrigger
  - - org.apache.ivy.plugins.trigger.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 Summary

    Constructors
    Constructor and Description
    `LogTrigger()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `log(java.lang.String message)` Logs the given message.
    `void` | `progress(IvyEvent event)`
    `void` | `setAppend(boolean append)` If true, append to existing file.
    `void` | `setEncoding(java.lang.String encoding)` Declare the encoding to use when outputting to a file; Use "" for the platform's default encoding.
    `void` | `setFile(java.io.File file)` File to write to.
    `void` | `setMessage(java.lang.String msg)` Message to write.

    - ### Methods inherited from class org.apache.ivy.plugins.trigger.AbstractTrigger

      `getEvent, getEventFilter, getFilter, getMatcher, setEvent, setFilter, setMatcher`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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.