Actions42
- Container Actions
- Image Actions
- Network Actions
- System Actions
- Volume Actions
Container → Logs
AI-generatedSummary
Collect Docker container logs and return them as aggregated or split log items
Inputs
- containerId (required) — Container name or full/short container ID
- includeStdout — Whether to include stdout output
- includeStderr — Whether to include stderr output
- logsMode — Mode for reading logs: snapshot or follow for a duration
- logsOutputMode — How to return collected log lines: aggregate or split per line
- tail — Number of lines from the end of logs, or "all"
- timestamps — Whether to prefix log lines with Docker timestamps
- since — Only return logs since this timestamp
- until — Only return logs before this timestamp
- logsFollowDurationSeconds — When following logs, duration in seconds before returning
Output shape
single aggregated log payload or array of individual log entries
When logsOutputMode is aggregate the operation returns one item containing the full log batch; when splitItems it returns multiple items, one per line. Optional parameters such as timestamps, since, until, tail, and logsFollowDurationSeconds can limit the output.
Examples
Example 1: Fetch the last 100 lines of a container's logs as a single aggregated item
containerId=n8n, logsMode=snapshot, logsOutputMode=aggregate, tail=100, timestamps=true
Example 2: Follow a container's logs for 30 seconds, returning each line as a separate item
containerId=myContainer, logsMode=followForDuration, logsFollowDurationSeconds=30, logsOutputMode=splitItems
Example 3: Retrieve logs since a specific timestamp, including timestamps in output
containerId=web, since=2026-04-13T06:00:00Z, timestamps=true, logsOutputMode=aggregate