Skip to content

Commit

Permalink
fix(log_upload): redirect stderr to stdout when collecting container …
Browse files Browse the repository at this point in the history
…logs
  • Loading branch information
reubenmiller committed Oct 28, 2024
1 parent c5d10e3 commit 7dd2b05
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

0 comments on commit 7dd2b05

Please sign in to comment.