public class DefaultLogCallback extends Object implements LogCallback
LogCallback.DoneException
Constructor and Description |
---|
DefaultLogCallback(LogOutputSpec outputSpec) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Invoked by a user when callback is no longer used.
|
void |
error(String error)
Method called in case on an error when reading the logs
|
void |
log(int type,
Timestamp timestamp,
String txt)
Receive a log entry
|
void |
open()
To be called by a client to start the callback and allocate the underlying output stream.
|
public DefaultLogCallback(LogOutputSpec outputSpec)
public void open() throws IOException
LogCallback
open
in interface LogCallback
IOException
public void close()
LogCallback
close
in interface LogCallback
public void log(int type, Timestamp timestamp, String txt)
LogCallback
log
in interface LogCallback
type
- 1 for log on standard output, 2 for standard errortimestamp
- timestampp on the server side when this entry happenedtxt
- log outputpublic void error(String error)
LogCallback
error
in interface LogCallback
error
- error descriptionCopyright © 2020. All rights reserved.