mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
feat: remove usage of zerolog.Logger.Msgf() from zot code (#1382)
Signed-off-by: Nicol Draghici <idraghic@cisco.com>
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user