Class StreamHandler
java.lang.Object
org.tasktide.engine.executor.streamhandler.StreamHandler
Stdout and Stderr log stream handler for
ProcessExecutor.
Logs lt 1MB stored in DB, otherwise zipped and recorded in DB.
Functional Interface and LogTarget could help with sinking
to say CloudWatch etc-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets stderr fileString[]Gets stderr arrGets stdout fileString[]Get stdout arrvoidMeasures log file size less than 1MB is stored in DB, otherwise file is retained and logged on databaselongMeasure size of both stdout, and stderrString[]Read stderr fileString[]Read stdout filevoidsetStderrArr(String[] stderrArr) Sets stderr arrvoidsetStdoutArr(String[] stdoutArr) Sets stdout arrvoidUnpacks zip filezipFiles()Zip the stdour/stderr logs
-
Constructor Details
-
StreamHandler
-
-
Method Details
-
handleLogs
Measures log file size less than 1MB is stored in DB, otherwise file is retained and logged on database- Throws:
IOException
-
measureSizes
Measure size of both stdout, and stderr- Returns:
- long
- Throws:
IOException
-
zipFiles
Zip the stdour/stderr logs- Returns:
- Zip Size
- Throws:
IOException
-
unpackZip
Unpacks zip file- Parameters:
zipFile-- Throws:
IOException
-
readStderr
Read stderr file- Returns:
- String[]
- Throws:
IOException
-
readStdout
Read stdout file- Returns:
- String[]
- Throws:
IOException
-
getStdout
-
getStderr
-
getStderrArr
-
setStderrArr
-
getStdoutArr
-
setStdoutArr
-