@@ -17,12 +17,12 @@ package builder
17
17
18
18
import (
19
19
"math"
20
- "os"
21
20
"strconv"
22
21
"strings"
23
22
24
23
"github.com/arduino/arduino-cli/legacy/builder/constants"
25
24
"github.com/arduino/arduino-cli/legacy/builder/types"
25
+ "github.com/arduino/arduino-cli/legacy/builder/utils"
26
26
"github.com/arduino/go-paths-helper"
27
27
"github.com/marcinbor85/gohex"
28
28
"github.com/pkg/errors"
@@ -39,7 +39,6 @@ func (s *MergeSketchWithBootloader) Run(ctx *types.Context) error {
39
39
buildPath := ctx .BuildPath
40
40
sketch := ctx .Sketch
41
41
sketchFileName := sketch .MainFile .Name .Base ()
42
- logger := ctx .GetLogger ()
43
42
44
43
sketchInBuildPath := buildPath .Join (sketchFileName + ".hex" )
45
44
sketchInSubfolder := buildPath .Join (constants .FOLDER_SKETCH , sketchFileName + ".hex" )
@@ -63,7 +62,7 @@ func (s *MergeSketchWithBootloader) Run(ctx *types.Context) error {
63
62
64
63
bootloaderPath := buildProperties .GetPath (constants .BUILD_PROPERTIES_RUNTIME_PLATFORM_PATH ).Join (constants .FOLDER_BOOTLOADERS , bootloader )
65
64
if bootloaderPath .NotExist () {
66
- logger . Fprintln ( os . Stdout , constants .LOG_LEVEL_WARN , constants .MSG_BOOTLOADER_FILE_MISSING , bootloaderPath )
65
+ utils . LogIfVerbose ( constants .LOG_LEVEL_WARN , constants .MSG_BOOTLOADER_FILE_MISSING , bootloaderPath )
67
66
return nil
68
67
}
69
68
@@ -77,7 +76,7 @@ func (s *MergeSketchWithBootloader) Run(ctx *types.Context) error {
77
76
}
78
77
err := merge (builtSketchPath , bootloaderPath , mergedSketchPath , maximumBinSize )
79
78
if err != nil {
80
- logger . Fprintln ( os . Stdout , constants .LOG_LEVEL_WARN , err .Error ())
79
+ utils . LogIfVerbose ( constants .LOG_LEVEL_INFO , err .Error ())
81
80
}
82
81
83
82
return nil
0 commit comments