Class BuildLogger.StreamWriting

java.lang.Object
net.bytebuddy.build.BuildLogger.StreamWriting
All Implemented Interfaces:
BuildLogger
Enclosing interface:
BuildLogger

@Enhance public static class BuildLogger.StreamWriting extends Object implements BuildLogger
A build logger that writes all statements to a PrintStream.
  • Field Details

    • printStream

      private final PrintStream printStream
      The target for writing statements.
  • Constructor Details

    • StreamWriting

      public StreamWriting(PrintStream printStream)
      Creates a new stream writing build logger.
      Parameters:
      printStream - The target for writing statements.
  • Method Details

    • toSystemOut

      public static BuildLogger toSystemOut()
      Creates a build logger that writes to System.out.
      Returns:
      A build logger that writes to System.out.
    • toSystemError

      public static BuildLogger toSystemError()
      Creates a build logger that writes to System.err.
      Returns:
      A build logger that writes to System.err.
    • isDebugEnabled

      public boolean isDebugEnabled()
      Returns true if the debug log level is enabled.
      Specified by:
      isDebugEnabled in interface BuildLogger
      Returns:
      true if the debug log level is enabled.
    • debug

      public void debug(String message)
      Logs a message on the debug level.
      Specified by:
      debug in interface BuildLogger
      Parameters:
      message - The message to log.
    • debug

      public void debug(String message, Throwable throwable)
      Logs a message on the debug level.
      Specified by:
      debug in interface BuildLogger
      Parameters:
      message - The message to log.
      throwable - A throwable that is attached to the message.
    • isInfoEnabled

      public boolean isInfoEnabled()
      Returns true if the info log level is enabled.
      Specified by:
      isInfoEnabled in interface BuildLogger
      Returns:
      true if the info log level is enabled.
    • info

      public void info(String message)
      Logs a message on the info level.
      Specified by:
      info in interface BuildLogger
      Parameters:
      message - The message to log.
    • info

      public void info(String message, Throwable throwable)
      Logs a message on the info level.
      Specified by:
      info in interface BuildLogger
      Parameters:
      message - The message to log.
      throwable - A throwable that is attached to the message.
    • isWarnEnabled

      public boolean isWarnEnabled()
      Returns true if the warn log level is enabled.
      Specified by:
      isWarnEnabled in interface BuildLogger
      Returns:
      true if the warn log level is enabled.
    • warn

      public void warn(String message)
      Logs a message on the warn level.
      Specified by:
      warn in interface BuildLogger
      Parameters:
      message - The message to log.
    • warn

      public void warn(String message, Throwable throwable)
      Logs a message on the warn level.
      Specified by:
      warn in interface BuildLogger
      Parameters:
      message - The message to log.
      throwable - A throwable that is attached to the message.
    • isErrorEnabled

      public boolean isErrorEnabled()
      Returns true if the error log level is enabled.
      Specified by:
      isErrorEnabled in interface BuildLogger
      Returns:
      true if the error log level is enabled.
    • error

      public void error(String message)
      Logs a message on the error level.
      Specified by:
      error in interface BuildLogger
      Parameters:
      message - The message to log.
    • error

      public void error(String message, Throwable throwable)
      Logs a message on the error level.
      Specified by:
      error in interface BuildLogger
      Parameters:
      message - The message to log.
      throwable - A throwable that is attached to the message.