Skip to content

Commit

Permalink
Merge pull request #38 from thin-edge/fix-container-logs-stderr
Browse files Browse the repository at this point in the history
fix(log_upload): redirect stderr to stdout when collecting container logs
  • Loading branch information
reubenmiller authored Oct 28, 2024
2 parents c5d10e3 + 7dd2b05 commit eb05397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/tedge/container-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TMP_FILE="${TMP_LOG_DIR}/${TYPE}_${CONTAINER_NAME}_$(date -Iseconds).log"
} > "$TMP_FILE"

# Write logs to file (stripping any ansci colour codes)
$DOCKER_CMD logs -n "$MAX_LINES" --since "$DATE_FROM" --until "$DATE_TO" "$CONTAINER_NAME" \
$DOCKER_CMD logs -n "$MAX_LINES" --since "$DATE_FROM" --until "$DATE_TO" "$CONTAINER_NAME" 2>&1 \
| sed -e 's/\x1b\[[0-9;]*m//g' \
| tee -a "$TMP_FILE"

Expand Down

1 comment on commit eb05397

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
12 0 1 12 100 1m24.731257s

Passed Tests

Name ⏱️ Duration Suite
Grace period to allow container to startup 5.002 s Operations
Get Logfile Request 2.516 s Operations
Get Configuration File 5.021 s Operations
Execute Shell Command 2.501 s Operations
Install application using docker compose 22.316 s Operations
Get Container Logs 2.505 s Operations
Trigger self update via local command 12.180 s Self-Update
Self update should only update if there is a new image 4.665 s Self-Update
Self update using software update operation 24.844 s Self-Update
Cloud Connection is Online 0.179 s Telemetry
Service status 0.332 s Telemetry
Sends measurements 2.670 s Telemetry

Please sign in to comment.