@@ -433,6 +433,7 @@ Please make sure the folder is not occupied by other procedures .`);
433
433
* manages the build state.
434
434
* @param mode See build()
435
435
* @param buildDir See build()
436
+ * @see https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc
436
437
*/
437
438
private async _build ( mode : BuildMode , buildDir ?: string ) : Promise < boolean > {
438
439
const dc = DeviceContext . getInstance ( ) ;
@@ -504,7 +505,10 @@ Please make sure the folder is not occupied by other procedures .`);
504
505
}
505
506
506
507
// We always build verbosely but filter the output based on the settings
507
- args . push ( "--verbose" ) ;
508
+ args . push ( "--verbose-build" ) ;
509
+ if ( verbose ) {
510
+ args . push ( "--verbose-upload" ) ;
511
+ }
508
512
509
513
await vscode . workspace . saveAll ( false ) ;
510
514
@@ -559,12 +563,31 @@ Please make sure the folder is not occupied by other procedures .`);
559
563
const stderrcb = ( line : string ) => {
560
564
if ( os . platform ( ) === "win32" ) {
561
565
line = line . trim ( ) ;
562
- if ( line . length && ! line . startsWith ( "DEBUG " ) && ! line . startsWith ( "TRACE " ) && ! line . startsWith ( "INFO " ) ) {
563
- arduinoChannel . channel . append ( `${ line } ${ os . EOL } ` ) ;
566
+ if ( line . length <= 0 ) {
567
+ return ;
568
+ }
569
+ line = `${ line } ${ os . EOL } ` ;
570
+ }
571
+ if ( ! verbose ) {
572
+ // Don't spill log with spurious info from the backend
573
+ // This list could be fetched from a config file to
574
+ // accommodate messages of unknown board packages, newer
575
+ // backend revisions etc.
576
+ const filters = [
577
+ / ^ P i c k e d \s u p \s J A V A _ T O O L _ O P T I O N S : \s + / ,
578
+ / ^ \d + \d + - \d + - \d + T \d + : \d + : \d + .\d + Z \s I N F O \s / ,
579
+ / ^ \d + \d + - \d + - \d + T \d + : \d + : \d + .\d + Z \s W A R N \s / ,
580
+ / ^ D E B U G \s + / ,
581
+ / ^ T R A C E \s + / ,
582
+ / ^ I N F O \s + / ,
583
+ ] ;
584
+ for ( const f of filters ) {
585
+ if ( line . match ( f ) ) {
586
+ return ;
587
+ }
564
588
}
565
- } else {
566
- arduinoChannel . channel . append ( line ) ;
567
589
}
590
+ arduinoChannel . channel . append ( line ) ;
568
591
}
569
592
570
593
return await util . spawn (
0 commit comments