Merge pull request #7295 from dokku/fix-proxy-logs-again

Respect the exit code and pass flags correctly when tailing nginx logs on k3s
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2024-10-21 21:51:58 -04:00
commit 778f563611
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -85,6 +85,7 @@ nginx_logs() {
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP") local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
plugn trigger scheduler-proxy-logs "$DOKKU_SCHEDULER" "$APP" "nginx" "$NGINX_LOGS_TYPE" "$tail" "$num" plugn trigger scheduler-proxy-logs "$DOKKU_SCHEDULER" "$APP" "nginx" "$NGINX_LOGS_TYPE" "$tail" "$num"
return $?
fi fi
if [[ "$tail" == "true" ]]; then if [[ "$tail" == "true" ]]; then
+2 -1
View File
@@ -866,7 +866,8 @@ func TriggerSchedulerProxyLogs(scheduler string, appName string, proxyType strin
command = append(command, "-F") command = append(command, "-F")
} }
if numLines > 0 { if numLines > 0 {
command = append(command, fmt.Sprintf("-n %d", numLines)) command = append(command, "-n")
command = append(command, strconv.FormatInt(numLines, 10))
} }
command = append(command, filename) command = append(command, filename)