@@ -527,7 +527,7 @@ func detectUploadPort(
527
527
result f.Future [* discovery.Port ],
528
528
) {
529
529
log := logrus .WithField ("task" , "port_detection" )
530
- log .Tracef ("Detecting new board port after upload" )
530
+ log .Debugf ("Detecting new board port after upload" )
531
531
532
532
candidate := uploadPort .Clone ()
533
533
defer func () {
@@ -543,11 +543,11 @@ func detectUploadPort(
543
543
return
544
544
}
545
545
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" )
547
547
waitForUploadPort = true
548
548
candidate = nil
549
549
} else {
550
- log .WithField ("event" , ev ).Trace ("Ignored watcher event before upload" )
550
+ log .WithField ("event" , ev ).Debug ("Ignored watcher event before upload" )
551
551
}
552
552
continue
553
553
case <- uploadCtx .Done ():
@@ -569,17 +569,17 @@ func detectUploadPort(
569
569
return
570
570
}
571
571
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" )
573
573
candidate = nil
574
574
if ! waitForUploadPort {
575
575
waitForUploadPort = true
576
576
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" )
578
578
}
579
579
continue
580
580
}
581
581
if ev .Type != "add" {
582
- log .WithField ("event" , ev ).Trace ("Ignored non-add event" )
582
+ log .WithField ("event" , ev ).Debug ("Ignored non-add event" )
583
583
continue
584
584
}
585
585
@@ -602,21 +602,21 @@ func detectUploadPort(
602
602
evPortPriority := portPriority (ev .Port )
603
603
candidatePriority := portPriority (candidate )
604
604
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 )
606
606
continue
607
607
}
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 )
609
609
candidate = ev .Port
610
610
611
611
// If the current candidate have the desired HW-ID return it quickly.
612
612
if candidate .HardwareID == ev .Port .HardwareID {
613
613
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." )
615
615
continue
616
616
}
617
617
618
618
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" )
620
620
return
621
621
}
622
622
}
0 commit comments