From d2cd59084c5e6195c4724bf73cbd24e8190c0cf3 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Wed, 1 Jul 2020 11:40:25 +0200 Subject: [PATCH] GH-680: Reduced the log level in package manager From now on, we log with the `debug` level instead of `info`. Closes #680 Signed-off-by: Akos Kitta --- arduino/cores/packagemanager/package_manager.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arduino/cores/packagemanager/package_manager.go b/arduino/cores/packagemanager/package_manager.go index 7c7437d0384..72fab5ca4a8 100644 --- a/arduino/cores/packagemanager/package_manager.go +++ b/arduino/cores/packagemanager/package_manager.go @@ -338,20 +338,20 @@ func (pm *PackageManager) GetInstalledPlatformRelease(platform *cores.Platform) return nil } - log := func(msg string, pl *cores.PlatformRelease) { + debug := func(msg string, pl *cores.PlatformRelease) { pm.Log.WithField("bundle", pl.IsIDEBundled). WithField("version", pl.Version). WithField("managed", pm.IsManagedPlatformRelease(pl)). - Infof("%s: %s", msg, pl) + Debugf("%s: %s", msg, pl) } best := releases[0] bestIsManaged := pm.IsManagedPlatformRelease(best) - log("current best", best) + debug("current best", best) for _, candidate := range releases[1:] { candidateIsManaged := pm.IsManagedPlatformRelease(candidate) - log("candidate", candidate) + debug("candidate", candidate) // TODO: Disentangle this algorithm and make it more straightforward if bestIsManaged == candidateIsManaged { if best.IsIDEBundled == candidate.IsIDEBundled { @@ -367,7 +367,7 @@ func (pm *PackageManager) GetInstalledPlatformRelease(platform *cores.Platform) best = candidate bestIsManaged = true } - log("current best", best) + debug("current best", best) } return best }