Interface ConsoleLogger

  • All Known Implementing Classes:
    GrailsConsole, GrailsEclipseConsole

    public interface ConsoleLogger
    Interface containing methods for logging to the Grails console
    Since:
    3.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addStatus​(java.lang.String msg)
      Adds a new message that won't be overwritten by {#updateStatus(String)}
      void error​(java.lang.String msg)
      Prints an error message
      void error​(java.lang.String label, java.lang.String message)
      Log an error with a specific error label
      void error​(java.lang.String msg, java.lang.Throwable error)
      Use to log an error
      void error​(java.lang.Throwable error)
      Use to log an error
      void indicateProgress()
      Indicates progress with the default progress indicator
      void indicateProgress​(int number)
      Indicates progress by number
      void indicateProgress​(int number, int total)
      Indicate progress for a number and total
      void indicateProgressPercentage​(long number, long total)
      Indicates progress as a percentage for the given number and total
      void info​(java.lang.String msg)
      Synonym for #log
      void log​(java.lang.String msg)
      Logs a message below the current status message
      void updateStatus​(java.lang.String msg)
      Updates the current state message
      void verbose​(java.lang.String msg)
      Outputs a verbose message
      void warn​(java.lang.String msg)
      Prints a warning message
      void warning​(java.lang.String msg)
      Prints a warning message
    • Method Detail

      • indicateProgress

        void indicateProgress()
        Indicates progress with the default progress indicator
      • indicateProgress

        void indicateProgress​(int number,
                              int total)
        Indicate progress for a number and total
        Parameters:
        number - The current number
        total - The total number
      • indicateProgressPercentage

        void indicateProgressPercentage​(long number,
                                        long total)
        Indicates progress as a percentage for the given number and total
        Parameters:
        number - The number
        total - The total
      • indicateProgress

        void indicateProgress​(int number)
        Indicates progress by number
        Parameters:
        number - The number
      • updateStatus

        void updateStatus​(java.lang.String msg)
        Updates the current state message
        Parameters:
        msg - The message
      • addStatus

        void addStatus​(java.lang.String msg)
        Adds a new message that won't be overwritten by {#updateStatus(String)}
        Parameters:
        msg - The message
      • error

        void error​(java.lang.String msg)
        Prints an error message
        Parameters:
        msg - The error message
      • warning

        void warning​(java.lang.String msg)
        Prints a warning message
        Parameters:
        msg - The warning message
      • warn

        void warn​(java.lang.String msg)
        Prints a warning message
        Parameters:
        msg - The warning message
      • error

        void error​(java.lang.String msg,
                   java.lang.Throwable error)
        Use to log an error
        Parameters:
        msg - The message
        error - The error
      • error

        void error​(java.lang.String label,
                   java.lang.String message)
        Log an error with a specific error label
        Parameters:
        label - The label
        message - The message
      • error

        void error​(java.lang.Throwable error)
        Use to log an error
        Parameters:
        error - The error
      • log

        void log​(java.lang.String msg)
        Logs a message below the current status message
        Parameters:
        msg - The message to log
      • info

        void info​(java.lang.String msg)
        Synonym for #log
        Parameters:
        msg - The message to log
      • verbose

        void verbose​(java.lang.String msg)
        Outputs a verbose message
        Parameters:
        msg - The message