Skip to content

Commit 7883e01

Browse files
committed
Let "archiving core" message appear only if verbose
Fixes arduino#238
1 parent 8d63641 commit 7883e01

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: src/arduino.cc/builder/constants/constants.go

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ const LOG_LEVEL_ERROR = "error"
150150
const LOG_LEVEL_INFO = "info"
151151
const LOG_LEVEL_WARN = "warn"
152152
const MSG_ARCH_FOLDER_NOT_SUPPORTED = "'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information"
153+
const MSG_ARCHIVING_CORE_CACHE = "Archiving built core (caching) in: {0}"
153154
const MSG_BOARD_UNKNOWN = "Board {0} (platform {1}, package {2}) is unknown"
154155
const MSG_BOOTLOADER_FILE_MISSING = "Bootloader file specified but missing: {0}"
155156
const MSG_BUILD_OPTIONS_CHANGED = "Build options changed, rebuilding all"

Diff for: src/arduino.cc/builder/phases/core_builder.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
package phases
3131

3232
import (
33+
"os"
3334
"path/filepath"
3435

3536
"arduino.cc/builder/builder_utils"
@@ -126,7 +127,9 @@ func compileCore(buildPath string, buildCachePath string, buildProperties proper
126127

127128
// archive core.a
128129
if targetArchivedCore != "" {
129-
logger.Println(constants.LOG_LEVEL_DEBUG, "Archiving built core (caching) in: "+targetArchivedCore)
130+
if verbose {
131+
logger.Fprintln(os.Stdout, constants.LOG_LEVEL_DEBUG, constants.MSG_ARCHIVING_CORE_CACHE, targetArchivedCore)
132+
}
130133
builder_utils.CopyFile(archiveFile, targetArchivedCore)
131134
}
132135

0 commit comments

Comments
 (0)