Class FileLogger

  • All Implemented Interfaces:
    org.apache.maven.shared.invoker.InvocationOutputHandler, org.apache.maven.shared.scriptinterpreter.ExecutionLogger, org.apache.maven.shared.utils.cli.StreamConsumer

    class FileLogger
    extends org.apache.maven.shared.scriptinterpreter.FileLogger
    implements org.apache.maven.shared.invoker.InvocationOutputHandler, org.apache.maven.shared.scriptinterpreter.ExecutionLogger
    • Constructor Summary

      Constructors 
      Constructor Description
      FileLogger​(java.io.File outputFile)
      Creates a new logger that writes to the specified file.
      FileLogger​(java.io.File outputFile, org.apache.maven.plugin.logging.Log log)
      Creates a new logger that writes to the specified file and optionally mirrors messages to the given mojo logger.
    • Method Summary

      • Methods inherited from class org.apache.maven.shared.scriptinterpreter.FileLogger

        close, consumeLine, finalize, getOutputFile, getPrintStream
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.maven.shared.scriptinterpreter.ExecutionLogger

        consumeLine, getPrintStream
      • Methods inherited from interface org.apache.maven.shared.utils.cli.StreamConsumer

        consumeLine
    • Constructor Detail

      • FileLogger

        FileLogger​(java.io.File outputFile)
            throws java.io.IOException
        Creates a new logger that writes to the specified file.
        Parameters:
        outputFile - The path to the output file, must not be null.
        Throws:
        java.io.IOException - If the output file could not be created.
      • FileLogger

        FileLogger​(java.io.File outputFile,
                   org.apache.maven.plugin.logging.Log log)
            throws java.io.IOException
        Creates a new logger that writes to the specified file and optionally mirrors messages to the given mojo logger.
        Parameters:
        outputFile - The path to the output file, must not be null.
        log - The mojo logger to additionally output messages to, may be null if not used.
        Throws:
        java.io.IOException - If the output file could not be created.