Package io.fabric8.maven.docker.log
Class DefaultLogCallback
- java.lang.Object
-
- io.fabric8.maven.docker.log.DefaultLogCallback
-
- All Implemented Interfaces:
LogCallback
public class DefaultLogCallback extends Object implements LogCallback
- Since:
- 26/09/15
- Author:
- roland
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.fabric8.maven.docker.access.log.LogCallback
LogCallback.DoneException
-
-
Constructor Summary
Constructors Constructor Description DefaultLogCallback(LogOutputSpec outputSpec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Invoked by a user when callback is no longer used.voiderror(String error)Method called in case on an error when reading the logsvoidlog(int type, ZonedDateTime timestamp, String txt)Receive a log entryvoidopen()To be called by a client to start the callback and allocate the underlying output stream.
-
-
-
Constructor Detail
-
DefaultLogCallback
public DefaultLogCallback(LogOutputSpec outputSpec)
-
-
Method Detail
-
open
public void open() throws IOExceptionDescription copied from interface:LogCallbackTo be called by a client to start the callback and allocate the underlying output stream. In case of a shared stream it might be that the stream is reused- Specified by:
openin interfaceLogCallback- Throws:
IOException
-
close
public void close()
Description copied from interface:LogCallbackInvoked by a user when callback is no longer used. Closing the underlying stream may be delayed by the implementation when this stream is shared between multiple clients.- Specified by:
closein interfaceLogCallback
-
log
public void log(int type, ZonedDateTime timestamp, String txt)Description copied from interface:LogCallbackReceive a log entry- Specified by:
login interfaceLogCallback- Parameters:
type- 1 for log on standard output, 2 for standard errortimestamp- timestampp on the server side when this entry happenedtxt- log output
-
error
public void error(String error)
Description copied from interface:LogCallbackMethod called in case on an error when reading the logs- Specified by:
errorin interfaceLogCallback- Parameters:
error- error description
-
-