mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #6607 from dokku/6602-unbuffered-logs
Call sed in unbuffered form to ensure log output is streamed to stdout
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