From bda4f50eae84f7079a887f82d8e580f4f408cdfb Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 10 Apr 2024 10:08:04 +0200 Subject: [PATCH] Avoid cumulative send anonymous usage log --- cmd/traefik/traefik.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/traefik/traefik.go b/cmd/traefik/traefik.go index 999e56308..e373864c1 100644 --- a/cmd/traefik/traefik.go +++ b/cmd/traefik/traefik.go @@ -593,16 +593,16 @@ func checkNewVersion() { } func stats(staticConfiguration *static.Configuration) { - logger := log.Info() + logger := log.With().Logger() if staticConfiguration.Global.SendAnonymousUsage { - logger.Msg(`Stats collection is enabled.`) - logger.Msg(`Many thanks for contributing to Traefik's improvement by allowing us to receive anonymous information from your configuration.`) - logger.Msg(`Help us improve Traefik by leaving this feature on :)`) - logger.Msg(`More details on: https://doc.traefik.io/traefik/contributing/data-collection/`) + logger.Info().Msg(`Stats collection is enabled.`) + logger.Info().Msg(`Many thanks for contributing to Traefik's improvement by allowing us to receive anonymous information from your configuration.`) + logger.Info().Msg(`Help us improve Traefik by leaving this feature on :)`) + logger.Info().Msg(`More details on: https://doc.traefik.io/traefik/contributing/data-collection/`) collect(staticConfiguration) } else { - logger.Msg(` + logger.Info().Msg(` Stats collection is disabled. Help us improve Traefik by turning this feature on :) More details on: https://doc.traefik.io/traefik/contributing/data-collection/