logs

fun logs(project: String, service: String, parameters: ContainerLogsParameters = ContainerLogsParameters(), includeOneOff: Boolean = true, maxStreams: Int = 64): Flow<ComposeLogLine>

Reads all replicas of one service; equivalent to logs(project, setOf(service), ...).


fun logs(project: String, services: Set<String>? = null, parameters: ContainerLogsParameters = ContainerLogsParameters(), includeOneOff: Boolean = true, maxStreams: Int = 64): Flow<ComposeLogLine>

Cold, backpressured flow: discovers once per collection and opens one log stream per selected container. Fails before opening streams if the selection exceeds maxStreams. New replicas require recollection. Missing projects/services produce an empty flow. One-off and unknown one-off containers are included by default; false selects only confirmed regular replicas. services selects exact service names: null includes all containers (even without service labels); an empty set produces an empty flow without Docker requests. Blank names are rejected. The supplied set is copied when this method is called.

Each container preserves record order, but there is no global timestamp ordering. parameters (including tail) apply per container. Any discovery/stream failure fails collection and cancels sibling streams; cancellation and consumer failure release all requests. No retry is performed.