-
- 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 Loggerlogger
-
Constructor Summary
Constructors Constructor Description RedirectToLoggerCallback(Logger logger, Function1<ByteArray, String> payloadToString)
-
Method Summary
Modifier and Type Method Description final LoggergetLogger()UnitonNext(Frame frame)Main method of callback class. final RedirectToLoggerCallbackonWriteToStream(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
-
-
Method Detail
-
getLogger
final Logger getLogger()
-
onWriteToStream
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
-
-
-