From 7c446d5bfd0391fbe22a644188fb3afeeb9ae64c Mon Sep 17 00:00:00 2001 From: Christophe Lambin Date: Tue, 16 Apr 2024 23:28:27 +0200 Subject: [PATCH] feat: add startup log message --- cmd/traefik-simple-auth/traefik-simple-auth.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/traefik-simple-auth/traefik-simple-auth.go b/cmd/traefik-simple-auth/traefik-simple-auth.go index 62034e2..d835f79 100644 --- a/cmd/traefik-simple-auth/traefik-simple-auth.go +++ b/cmd/traefik-simple-auth/traefik-simple-auth.go @@ -28,6 +28,8 @@ var ( clientId = flag.String("client-id", "", "Google OAuth Client ID") clientSecret = flag.String("client-secret", "", "Google OAuth Client Secret") secret = flag.String("secret", "", "Secret to use for authentication") + + version string = "change-me" ) func main() { @@ -39,6 +41,8 @@ func main() { } l := slog.New(slog.NewJSONHandler(os.Stderr, &opts)) + l.Info("Starting traefik-simple-auth", "version", version) + go func() { if err := http.ListenAndServe(*promAddr, promhttp.Handler()); !errors.Is(err, http.ErrServerClosed) { l.Error("failed to start Prometheus metrics handler", "error", err)