Package 

Class RedirectToLoggerCallback

  • All Implemented Interfaces:
    com.github.dockerjava.api.async.ResultCallback , java.io.Closeable , java.lang.AutoCloseable

    
    public final class RedirectToLoggerCallback
    extends ResultCallbackTemplate<RedirectToLoggerCallback, Frame>
                        

    Callback that just writes the container's output using a Logger redirecting

    • StreamType.STDOUT and StreamType.RAW to Logger.quiet

    • StreamType.STDERR to Logger.warn

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Logger logger
    • Method Summary

      Modifier and Type Method Description
      final Logger getLogger()
      Unit onNext(Frame frame) Main method of callback class.
      final RedirectToLoggerCallback onWriteToStream(BiConsumer<StreamType, ByteArray> handler) Attaches a callback handler to the Frame processing inside of onNext that is called when a Frame with one of the following types is processed:
      • StreamType.STDOUT

      • StreamType.RAW

      • StreamType.STDERR

      • Methods inherited from class com.intershop.gradle.icm.docker.tasks.utils.RedirectToLoggerCallback

        awaitCompletion, awaitCompletion, awaitStarted, awaitStarted, close, onComplete, onError, onStart, throwFirstError
      • Methods inherited from class java.lang.Object

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

      • RedirectToLoggerCallback

        RedirectToLoggerCallback(Logger logger, Function1<ByteArray, String> payloadToString)