Class LogRecorder
- java.lang.Object
-
- com.exasol.udfdebugging.modules.udflogs.LogRecorder
-
- All Implemented Interfaces:
AutoCloseable
public final class LogRecorder extends Object implements AutoCloseable
This class opens a TCP socket and dumps everything toSTDOUT. It is used for printing logs from the UDF.
-
-
Constructor Summary
Constructors Constructor Description LogRecorder(Consumer<Path> logFileHandler)Create a new instance ofLogRecorder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetPort()Get the port the log recorder listens on.
-
-
-
Constructor Detail
-
LogRecorder
public LogRecorder(Consumer<Path> logFileHandler)
Create a new instance ofLogRecorder.- Parameters:
logFileHandler- callback to notify when a new log file is created
-
-
Method Detail
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getPort
public int getPort()
Get the port the log recorder listens on.- Returns:
- port number
-
-