From b6681f5befb3c01f3fc3e8fd276a22c5aa577187 Mon Sep 17 00:00:00 2001 From: Richard87 Date: Mon, 14 Oct 2024 17:16:06 +0200 Subject: [PATCH] feat: log list of queries found --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index adfa029..c5b53e7 100644 --- a/main.go +++ b/main.go @@ -3,9 +3,11 @@ package main import ( "context" "encoding/json" + "maps" "net/http" "os" "os/signal" + "slices" "time" prometheusApi "github.com/prometheus/client_golang/api" @@ -26,6 +28,7 @@ func main() { router := NewRouter(promController) + log.Ctx(ctx).Info().Strs("queries", slices.Collect(maps.Keys(queries))).Msg("Found queries") log.Ctx(ctx).Info().Msgf("Starting server on http://localhost:%d/query/{query}", config.Port) err := Serve(ctx, config.Port, router) log.Err(err).Msg("Terminated")