From addbbb9cbe1f958fb223915ca47e960e4791a839 Mon Sep 17 00:00:00 2001 From: Robin Dittmar Date: Mon, 20 Jul 2026 22:49:55 +0200 Subject: [PATCH] fix: "service shutdown" log is now always last on proper shutdown --- cmd/api-server/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/api-server/main.go b/cmd/api-server/main.go index 0c0df32..9cf1dab 100644 --- a/cmd/api-server/main.go +++ b/cmd/api-server/main.go @@ -36,6 +36,7 @@ func run(serviceName string, serviceVersion string) error { setupLogging() slog.Info("starting service", slog.String("service", serviceName), slog.String("version", serviceVersion)) + defer slog.Info("service shutdown!") cfg := config.Load() @@ -97,7 +98,6 @@ func run(serviceName string, serviceVersion string) error { return err } - slog.Info("service shutdown successful!") return nil }