@@ -24,7 +24,6 @@ import (
2424 "github.com/arduino/arduino-cli/arduino/sketch"
2525 "github.com/arduino/arduino-cli/i18n"
2626 "github.com/arduino/arduino-cli/legacy/builder/builder_utils"
27- "github.com/arduino/arduino-cli/legacy/builder/constants"
2827 "github.com/arduino/arduino-cli/legacy/builder/phases"
2928 "github.com/arduino/arduino-cli/legacy/builder/types"
3029 "github.com/arduino/arduino-cli/legacy/builder/utils"
@@ -59,31 +58,31 @@ func (s *Builder) Run(ctx *types.Context) error {
5958
6059 & ContainerMergeCopySketchFiles {},
6160
62- utils .LogIfVerbose (constants . LOG_LEVEL_INFO , tr ("Detecting libraries used..." )),
61+ utils .LogIfVerbose ("info" , tr ("Detecting libraries used..." )),
6362 & ContainerFindIncludes {},
6463
6564 & WarnAboutArchIncompatibleLibraries {},
6665
67- utils .LogIfVerbose (constants . LOG_LEVEL_INFO , tr ("Generating function prototypes..." )),
66+ utils .LogIfVerbose ("info" , tr ("Generating function prototypes..." )),
6867 & PreprocessSketch {},
6968
70- utils .LogIfVerbose (constants . LOG_LEVEL_INFO , tr ("Compiling sketch..." )),
69+ utils .LogIfVerbose ("info" , tr ("Compiling sketch..." )),
7170 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.sketch.prebuild" , Suffix : ".pattern" },
7271 & phases.SketchBuilder {},
7372 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.sketch.postbuild" , Suffix : ".pattern" },
7473
75- utils .LogIfVerbose (constants . LOG_LEVEL_INFO , tr ("Compiling libraries..." )),
74+ utils .LogIfVerbose ("info" , tr ("Compiling libraries..." )),
7675 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.libraries.prebuild" , Suffix : ".pattern" },
7776 & UnusedCompiledLibrariesRemover {},
7877 & phases.LibrariesBuilder {},
7978 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.libraries.postbuild" , Suffix : ".pattern" },
8079
81- utils .LogIfVerbose (constants . LOG_LEVEL_INFO , tr ("Compiling core..." )),
80+ utils .LogIfVerbose ("info" , tr ("Compiling core..." )),
8281 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.core.prebuild" , Suffix : ".pattern" },
8382 & phases.CoreBuilder {},
8483 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.core.postbuild" , Suffix : ".pattern" },
8584
86- utils .LogIfVerbose (constants . LOG_LEVEL_INFO , tr ("Linking everything together..." )),
85+ utils .LogIfVerbose ("info" , tr ("Linking everything together..." )),
8786 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.linking.prelink" , Suffix : ".pattern" },
8887 & phases.Linker {},
8988 & RecipeByPrefixSuffixRunner {Prefix : "recipe.hooks.linking.postlink" , Suffix : ".pattern" },
@@ -203,7 +202,7 @@ func runCommands(ctx *types.Context, commands []types.Command) error {
203202
204203func PrintRingNameIfDebug (ctx * types.Context , command types.Command ) {
205204 if ctx .DebugLevel >= 10 {
206- ctx .GetLogger ().Fprintln (os .Stdout , constants . LOG_LEVEL_DEBUG , "Ts: {0} - Running: {1}" , strconv .FormatInt (time .Now ().Unix (), 10 ), reflect .Indirect (reflect .ValueOf (command )).Type ().Name ())
205+ ctx .GetLogger ().Fprintln (os .Stdout , "debug" , "Ts: {0} - Running: {1}" , strconv .FormatInt (time .Now ().Unix (), 10 ), reflect .Indirect (reflect .ValueOf (command )).Type ().Name ())
207206 }
208207}
209208
0 commit comments