From af3aac6b459791fabd8ebc306cdff47c609fbf53 Mon Sep 17 00:00:00 2001 From: Igor Drozdov Date: Wed, 15 Sep 2021 20:46:00 +0300 Subject: Add context fields to logging It adds correlation ids wherever possible --- cmd/gitlab-sshd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/gitlab-sshd/main.go') diff --git a/cmd/gitlab-sshd/main.go b/cmd/gitlab-sshd/main.go index 5bbf221..165c7a5 100644 --- a/cmd/gitlab-sshd/main.go +++ b/cmd/gitlab-sshd/main.go @@ -97,7 +97,7 @@ func main() { sig := <-done signal.Reset(syscall.SIGINT, syscall.SIGTERM) - log.WithFields(log.Fields{"shutdown_timeout_s": cfg.Server.GracePeriodSeconds, "signal": sig.String()}).Info("Shutdown initiated") + log.WithContextFields(ctx, log.Fields{"shutdown_timeout_s": cfg.Server.GracePeriodSeconds, "signal": sig.String()}).Info("Shutdown initiated") server.Shutdown() -- cgit v1.2.1