From 595a26654071e2bd4f158039221f4834b39c141f Mon Sep 17 00:00:00 2001 From: Periklis Tsirakidis Date: Fri, 14 Jun 2024 15:17:15 +0200 Subject: [PATCH] fix: Init internal server log along with loki's server instance --- cmd/loki/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/loki/main.go b/cmd/loki/main.go index 401085b3aab1..128efe6bc369 100644 --- a/cmd/loki/main.go +++ b/cmd/loki/main.go @@ -60,6 +60,10 @@ func main() { serverCfg := &config.Server serverCfg.Log = util_log.InitLogger(serverCfg, prometheus.DefaultRegisterer, false) + if config.InternalServer.Enable { + config.InternalServer.Log = serverCfg.Log + } + // Validate the config once both the config file has been loaded // and CLI flags parsed. if err := config.Validate(); err != nil {