public class InMemoryLogStreamFollower extends Object implements LogStreamFollower
LogStreamFollower
implementation that captures all container stdout/stderr to memory.
Provided mostly for debugging and other limited use cases, since extended container output
will be kept in memory without bound.Modifier and Type | Method and Description |
---|---|
static InMemoryLogStreamFollower |
create() |
void |
followLog(JobId jobId,
String containerId,
Iterator<com.spotify.docker.client.LogMessage> logStream)
Follows the specified log stream until it doesn't have any more log messages available.
|
byte[] |
getStderr(JobId jobId)
Get all the stderr that has been emitted by a container.
|
byte[] |
getStdout(JobId jobId)
Get all the stdout that has been emitted by a container.
|
public static InMemoryLogStreamFollower create()
public byte[] getStdout(JobId jobId)
jobId
- The JobId
for the container in question.public byte[] getStderr(JobId jobId)
jobId
- The JobId
for the container in question.public void followLog(JobId jobId, String containerId, Iterator<com.spotify.docker.client.LogMessage> logStream) throws IOException
LogStreamFollower
followLog
in interface LogStreamFollower
jobId
- the job id that the log stream belongs tocontainerId
- the container id that the log stream belongs tologStream
- the log stream to followIOException
- if an exception occurredCopyright © 2016. All rights reserved.