Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b4c02b9

Browse filesBrowse files
committed
Increased debug level
1 parent 54b7b94 commit b4c02b9
Copy full SHA for b4c02b9

File tree

1 file changed

+10
-10
lines changed
Filter options

1 file changed

+10
-10
lines changed

‎commands/upload/upload.go

Copy file name to clipboardExpand all lines: commands/upload/upload.go
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ func detectUploadPort(
527527
result f.Future[*discovery.Port],
528528
) {
529529
log := logrus.WithField("task", "port_detection")
530-
log.Tracef("Detecting new board port after upload")
530+
log.Debugf("Detecting new board port after upload")
531531

532532
candidate := uploadPort.Clone()
533533
defer func() {
@@ -543,11 +543,11 @@ func detectUploadPort(
543543
return
544544
}
545545
if candidate != nil && ev.Type == "remove" && ev.Port.Equals(candidate) {
546-
log.WithField("event", ev).Trace("User-specified port has been disconnected, forcing wait for upload port")
546+
log.WithField("event", ev).Debug("User-specified port has been disconnected, forcing wait for upload port")
547547
waitForUploadPort = true
548548
candidate = nil
549549
} else {
550-
log.WithField("event", ev).Trace("Ignored watcher event before upload")
550+
log.WithField("event", ev).Debug("Ignored watcher event before upload")
551551
}
552552
continue
553553
case <-uploadCtx.Done():
@@ -569,17 +569,17 @@ func detectUploadPort(
569569
return
570570
}
571571
if candidate != nil && ev.Type == "remove" && candidate.Equals(ev.Port) {
572-
log.WithField("event", ev).Trace("Candidate port is no longer available")
572+
log.WithField("event", ev).Debug("Candidate port is no longer available")
573573
candidate = nil
574574
if !waitForUploadPort {
575575
waitForUploadPort = true
576576
timeout = time.After(5 * time.Second)
577-
log.Trace("User-specified port has been disconnected, now waiting for upload port, timeout extended by 5 seconds")
577+
log.Debug("User-specified port has been disconnected, now waiting for upload port, timeout extended by 5 seconds")
578578
}
579579
continue
580580
}
581581
if ev.Type != "add" {
582-
log.WithField("event", ev).Trace("Ignored non-add event")
582+
log.WithField("event", ev).Debug("Ignored non-add event")
583583
continue
584584
}
585585

@@ -602,21 +602,21 @@ func detectUploadPort(
602602
evPortPriority := portPriority(ev.Port)
603603
candidatePriority := portPriority(candidate)
604604
if evPortPriority <= candidatePriority {
605-
log.WithField("event", ev).Tracef("New upload port candidate is worse than the current one (prio=%d)", evPortPriority)
605+
log.WithField("event", ev).Debugf("New upload port candidate is worse than the current one (prio=%d)", evPortPriority)
606606
continue
607607
}
608-
log.WithField("event", ev).Tracef("Found new upload port candidate (prio=%d)", evPortPriority)
608+
log.WithField("event", ev).Debugf("Found new upload port candidate (prio=%d)", evPortPriority)
609609
candidate = ev.Port
610610

611611
// If the current candidate have the desired HW-ID return it quickly.
612612
if candidate.HardwareID == ev.Port.HardwareID {
613613
timeout = time.After(time.Second)
614-
log.Trace("New candidate port match the desired HW ID, timeout reduced to 1 second.")
614+
log.Debug("New candidate port match the desired HW ID, timeout reduced to 1 second.")
615615
continue
616616
}
617617

618618
case <-timeout:
619-
log.WithField("selected_port", candidate).Trace("Timeout waiting for candidate port")
619+
log.WithField("selected_port", candidate).Debug("Timeout waiting for candidate port")
620620
return
621621
}
622622
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.