Avoid cumulative send anonymous usage log

This commit is contained in:
Michael 2024-04-10 10:08:04 +02:00 committed by GitHub
parent 0017471f0d
commit bda4f50eae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -593,16 +593,16 @@ func checkNewVersion() {
} }
func stats(staticConfiguration *static.Configuration) { func stats(staticConfiguration *static.Configuration) {
logger := log.Info() logger := log.With().Logger()
if staticConfiguration.Global.SendAnonymousUsage { if staticConfiguration.Global.SendAnonymousUsage {
logger.Msg(`Stats collection is enabled.`) logger.Info().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.Info().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.Info().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(`More details on: https://doc.traefik.io/traefik/contributing/data-collection/`)
collect(staticConfiguration) collect(staticConfiguration)
} else { } else {
logger.Msg(` logger.Info().Msg(`
Stats collection is disabled. Stats collection is disabled.
Help us improve Traefik by turning this feature on :) Help us improve Traefik by turning this feature on :)
More details on: https://doc.traefik.io/traefik/contributing/data-collection/ More details on: https://doc.traefik.io/traefik/contributing/data-collection/