Skip to content

Commit 5da1da3

Browse files
author
Federico Fissore
committed
Then debug level is 10, timestamp is printed before command name
Signed-off-by: Federico Fissore <[email protected]>
1 parent c678647 commit 5da1da3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import (
3737
"os"
3838
"reflect"
3939
"strconv"
40+
"time"
4041
)
4142

4243
var MAIN_FILE_VALID_EXTENSIONS = map[string]bool{".ino": true, ".pde": true}
@@ -207,7 +208,7 @@ func printProgressIfProgressEnabledAndMachineLogger(progressEnabled bool, contex
207208

208209
func PrintRingNameIfDebug(context map[string]interface{}, command types.Command) {
209210
if utils.DebugLevel(context) >= 10 {
210-
utils.Logger(context).Fprintln(os.Stderr, constants.MSG_RUNNING_COMMAND, reflect.Indirect(reflect.ValueOf(command)).Type().Name())
211+
utils.Logger(context).Fprintln(os.Stderr, constants.MSG_RUNNING_COMMAND, time.Now().Unix(), reflect.Indirect(reflect.ValueOf(command)).Type().Name())
211212
}
212213
}
213214

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ const MSG_PATTERN_MISSING = "{0} pattern is missing"
222222
const MSG_PLATFORM_UNKNOWN = "Platform {0} (package {1}) is unknown"
223223
const MSG_PROGRESS = "Progress {0}"
224224
const MSG_PROP_IN_LIBRARY = "Missing '{0}' from library in {1}"
225-
const MSG_RUNNING_COMMAND = "Running: {0}"
225+
const MSG_RUNNING_COMMAND = "Ts: {0} - Running: {1}"
226226
const MSG_RUNNING_RECIPE = "Running recipe: {0}"
227227
const MSG_SETTING_BUILD_PATH = "Setting build path to {0}"
228228
const MSG_SKETCH_CANT_BE_IN_BUILDPATH = "Sketch cannot be located in build path. Please specify a different build path"

0 commit comments

Comments
 (0)