LOGGER.debug("Executing Docker Log Container Request");
String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class);
LogContainerCmd logContainerCmd = client.logContainerCmd(containerId);
Boolean stdOut = DockerHelper.getProperty(DockerConstants.DOCKER_STD_OUT, configuration, message, Boolean.class);
if (stdOut != null && stdOut) {
logContainerCmd.withStdOut(stdOut);
}
Boolean stdErr = DockerHelper.getProperty(DockerConstants.DOCKER_STD_ERR, configuration, message, Boolean.class);
if (stdErr != null && stdErr) {
logContainerCmd.withStdErr(stdErr);
}
Boolean timestamps = DockerHelper.getProperty(DockerConstants.DOCKER_TIMESTAMPS, configuration, message, Boolean.class);
if (timestamps != null && timestamps) {
logContainerCmd.withTimestamps(timestamps);
}
Boolean followStream = DockerHelper.getProperty(DockerConstants.DOCKER_FOLLOW_STREAM, configuration, message, Boolean.class);
if (followStream != null && followStream) {
logContainerCmd.withFollowStream(followStream);
}
Boolean tailAll = DockerHelper.getProperty(DockerConstants.DOCKER_TAIL_ALL, configuration, message, Boolean.class);
if (tailAll != null && tailAll) {
logContainerCmd.withTailAll();
}
Integer tail = DockerHelper.getProperty(DockerConstants.DOCKER_TAIL, configuration, message, Integer.class);
if (tailAll != null) {
logContainerCmd.withTail(tail);
}
return logContainerCmd;
}