public class ApplicationStdIoCallback extends Object implements org.thales.punch.libraries.forkexec.api.IStdOutErrCallback
Note that some child applications are well designed and produce json logs, for these that json is leveraged and we generate a complete Json that also includes some extra information such as the runner id and shiva task name.
If the child application just produces stdout and stderr logs, we also generate a Json that encapsulate these logs in a single content.message field.
Last lines are truncated to avoid too big records flooding the log stream of the platform.
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationStdIoCallback.IO |
Constructor and Description |
---|
ApplicationStdIoCallback(ApplicationStdIoCallback.IO outputName,
org.thales.punch.libraries.shiva.api.Application application)
Create a callback to receive child process stdout and stderr logs
|
Modifier and Type | Method and Description |
---|---|
void |
onReceive(String line) |
static String |
truncate(String line,
int maxLength) |
public ApplicationStdIoCallback(ApplicationStdIoCallback.IO outputName, org.thales.punch.libraries.shiva.api.Application application)
outputName
- "out" or "err"application
- the target worker task, i.e. the child sub processCopyright © 2022. All rights reserved.