diff --git a/legacy/builder/resolve_library.go b/legacy/builder/resolve_library.go index 66694cc09c2..cc1887c5de8 100644 --- a/legacy/builder/resolve_library.go +++ b/legacy/builder/resolve_library.go @@ -40,12 +40,15 @@ import ( func ResolveLibrary(ctx *types.Context, header string) *libraries.Library { resolver := ctx.LibrariesResolver importedLibraries := ctx.ImportedLibraries - logger := ctx.GetLogger() candidates := resolver.AlternativesFor(header) - logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("Alternatives for %s: %s", header, candidates)) - logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("ResolveLibrary(%s)", header)) - logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf(" -> candidates: %s", candidates)) + + logger := ctx.GetLogger() + if ctx.Verbose { + logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("Alternatives for %s: %s", header, candidates)) + logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("ResolveLibrary(%s)", header)) + logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf(" -> candidates: %s", candidates)) + } if candidates == nil || len(candidates) == 0 { return nil