Skip to content

Commit 8f52678

Browse files
committed
Output library resolution details only at higher verbosity
This increase backward compatibility with arduino_builder
1 parent ce6c187 commit 8f52678

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

legacy/builder/resolve_library.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@ import (
4040
func ResolveLibrary(ctx *types.Context, header string) *libraries.Library {
4141
resolver := ctx.LibrariesResolver
4242
importedLibraries := ctx.ImportedLibraries
43-
logger := ctx.GetLogger()
4443

4544
candidates := resolver.AlternativesFor(header)
46-
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("Alternatives for %s: %s", header, candidates))
47-
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("ResolveLibrary(%s)", header))
48-
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf(" -> candidates: %s", candidates))
45+
46+
logger := ctx.GetLogger()
47+
if ctx.Verbose {
48+
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("Alternatives for %s: %s", header, candidates))
49+
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("ResolveLibrary(%s)", header))
50+
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf(" -> candidates: %s", candidates))
51+
}
4952

5053
if candidates == nil || len(candidates) == 0 {
5154
return nil

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy