Class ConsoleGitHubLogger

java.lang.Object
io.github.intisy.gradle.github.api.log.ConsoleGitHubLogger
All Implemented Interfaces:
GitHubLogger

public class ConsoleGitHubLogger extends Object implements GitHubLogger
A GitHubLogger for use outside a Gradle build, writing every level to System.err so System.out stays clean for consumers that parse it.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConsoleGitHubLogger(boolean debug)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    debug(String message)
    Records a verbose diagnostic message intended for troubleshooting, not routine output.
    void
    error(String message)
    Records a failure message with no associated exception.
    void
    error(String message, Throwable throwable)
    Records a failure message together with the exception that caused it.
    void
    log(String message)
    Records a normal, always-visible progress message (e.g.
    void
    warn(String message)
    Records a recoverable-condition message (e.g.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConsoleGitHubLogger

      public ConsoleGitHubLogger(boolean debug)
      Parameters:
      debug - whether debug(String) messages are written.
  • Method Details

    • log

      public void log(String message)
      Description copied from interface: GitHubLogger
      Records a normal, always-visible progress message (e.g. "Cloning repository...").
      Specified by:
      log in interface GitHubLogger
      Parameters:
      message - the fully formatted message; the implementation applies no templating or placeholder substitution, so build the final text with string concatenation before calling.
    • error

      public void error(String message)
      Description copied from interface: GitHubLogger
      Records a failure message with no associated exception.
      Specified by:
      error in interface GitHubLogger
      Parameters:
      message - the fully formatted message; the implementation applies no templating or placeholder substitution, so build the final text with string concatenation before calling.
    • error

      public void error(String message, Throwable throwable)
      Description copied from interface: GitHubLogger
      Records a failure message together with the exception that caused it.
      Specified by:
      error in interface GitHubLogger
      Parameters:
      message - the fully formatted message; the implementation applies no templating or placeholder substitution, so build the final text with string concatenation before calling.
      throwable - the exception that caused the failure.
    • debug

      public void debug(String message)
      Description copied from interface: GitHubLogger
      Records a verbose diagnostic message intended for troubleshooting, not routine output.
      Specified by:
      debug in interface GitHubLogger
      Parameters:
      message - the fully formatted message; the implementation applies no templating or placeholder substitution, so build the final text with string concatenation before calling.
    • warn

      public void warn(String message)
      Description copied from interface: GitHubLogger
      Records a recoverable-condition message (e.g. falling back to a cached jar after a rate limit).
      Specified by:
      warn in interface GitHubLogger
      Parameters:
      message - the fully formatted message; the implementation applies no templating or placeholder substitution, so build the final text with string concatenation before calling.