Skip to content

Commit

Permalink
Output library resolution details only at higher verbosity
Browse files Browse the repository at this point in the history
This increase backward compatibility with arduino_builder
  • Loading branch information
cmaglie committed Aug 27, 2019
1 parent ce6c187 commit 8f52678
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions legacy/builder/resolve_library.go
Expand Up @@ -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
Expand Down

0 comments on commit 8f52678

Please sign in to comment.