mirror of
https://github.com/dokku/dokku.git
synced 2026-08-29 10:08:53 +02:00
fix: call sed in unbuffered form to ensure log output is streamed to stdout
The new exec callers somehow setup the environment differently, causing sed to not properly detect that it should run in unbuffered form. This change forces sed to run in unbuffered mode. Closes #6602
This commit is contained in:
@@ -35,7 +35,7 @@ trigger-scheduler-docker-local-scheduler-logs() {
|
||||
if [[ $PRETTY_PRINT == "true" ]]; then
|
||||
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||
else
|
||||
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
|
||||
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -u -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
|
||||
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
|
||||
fi
|
||||
if [[ $i != "$MAX_INDEX" ]]; then
|
||||
|
||||
@@ -38,7 +38,7 @@ trigger-scheduler-docker-local-scheduler-logs() {
|
||||
if [[ $PRETTY_PRINT == "true" ]]; then
|
||||
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||
else
|
||||
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
|
||||
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -u -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
|
||||
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
|
||||
fi
|
||||
if [[ $i != "$MAX_INDEX" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user