Class DefaultLogCallback

  • All Implemented Interfaces:
    LogCallback

    public class DefaultLogCallback
    extends Object
    implements LogCallback
    Since:
    26/09/15
    Author:
    roland
    • Constructor Detail

      • DefaultLogCallback

        public DefaultLogCallback​(LogOutputSpec outputSpec)
    • Method Detail

      • open

        public void open()
                  throws IOException
        Description copied from interface: LogCallback
        To 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:
        open in interface LogCallback
        Throws:
        IOException
      • close

        public void close()
        Description copied from interface: LogCallback
        Invoked 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:
        close in interface LogCallback
      • log

        public void log​(int type,
                        ZonedDateTime timestamp,
                        String txt)
        Description copied from interface: LogCallback
        Receive a log entry
        Specified by:
        log in interface LogCallback
        Parameters:
        type - 1 for log on standard output, 2 for standard error
        timestamp - timestampp on the server side when this entry happened
        txt - log output
      • error

        public void error​(String error)
        Description copied from interface: LogCallback
        Method called in case on an error when reading the logs
        Specified by:
        error in interface LogCallback
        Parameters:
        error - error description