feat: remove usage of zerolog.Logger.Msgf() from zot code (#1382)

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
This commit is contained in:
Nicol
2023-04-28 05:44:22 +03:00
committed by GitHub
parent 40bf76add5
commit c169698c95
29 changed files with 354 additions and 294 deletions
+4 -3
View File
@@ -184,11 +184,12 @@ func runExporter(c *Controller) {
}
http.Handle(c.Config.Exporter.Metrics.Path, promhttp.Handler())
c.Log.Info().Msgf("Exporter is listening on %s & exposes metrics on %s path",
exporterAddr, c.Config.Exporter.Metrics.Path)
c.Log.Info().Str("exporter addr", exporterAddr).
Str("exporter metrics path", c.Config.Exporter.Metrics.Path).
Msg("Exporter is listening on exporter addr & exposes metrics on exporter metrics path")
serverAddr := fmt.Sprintf("%s://%s:%s", c.Config.Server.Protocol,
c.Config.Server.Host, c.Config.Server.Port)
c.Log.Info().Msgf("Scraping metrics from %s", serverAddr)
c.Log.Info().Str("serverAddr", serverAddr).Msg("Scraping metrics")
c.Log.Fatal().Err(server.ListenAndServe()).Msg("Exporter stopped")
}