@@ -196,6 +196,7 @@ export class ArduinoApp {
196
196
* manages the build state.
197
197
* @param buildMode See build()
198
198
* @param buildDir See build()
199
+ * @see https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc
199
200
*/
200
201
public async _build ( buildMode : BuildMode , compile : boolean , buildDir ?: string ) : Promise < boolean > {
201
202
const dc = DeviceContext . getInstance ( ) ;
@@ -315,7 +316,10 @@ export class ArduinoApp {
315
316
}
316
317
317
318
// We always build verbosely but filter the output based on the settings
318
- args . push ( "--verbose" ) ;
319
+ args . push ( "--verbose-build" ) ;
320
+ if ( verbose ) {
321
+ args . push ( "--verbose-upload" ) ;
322
+ }
319
323
320
324
await vscode . workspace . saveAll ( false ) ;
321
325
@@ -377,12 +381,31 @@ export class ArduinoApp {
377
381
const stderrcb = ( line : string ) => {
378
382
if ( os . platform ( ) === "win32" ) {
379
383
line = line . trim ( ) ;
380
- if ( line . length && ! line . startsWith ( "DEBUG " ) && ! line . startsWith ( "TRACE " ) && ! line . startsWith ( "INFO " ) ) {
381
- arduinoChannel . channel . append ( `${ line } ${ os . EOL } ` ) ;
384
+ if ( line . length <= 0 ) {
385
+ return ;
386
+ }
387
+ line = `${ line } ${ os . EOL } ` ;
388
+ }
389
+ if ( ! verbose ) {
390
+ // Don't spill log with spurious info from the backend
391
+ // This list could be fetched from a config file to
392
+ // accommodate messages of unknown board packages, newer
393
+ // backend revisions etc.
394
+ const filters = [
395
+ / ^ 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 + / ,
396
+ / ^ \d + \d + - \d + - \d + T \d + : \d + : \d + .\d + Z \s I N F O \s / ,
397
+ / ^ \d + \d + - \d + - \d + T \d + : \d + : \d + .\d + Z \s W A R N \s / ,
398
+ / ^ D E B U G \s + / ,
399
+ / ^ T R A C E \s + / ,
400
+ / ^ I N F O \s + / ,
401
+ ] ;
402
+ for ( const f of filters ) {
403
+ if ( line . match ( f ) ) {
404
+ return ;
405
+ }
382
406
}
383
- } else {
384
- arduinoChannel . channel . append ( line ) ;
385
407
}
408
+ arduinoChannel . channel . append ( line ) ;
386
409
}
387
410
388
411
return await util . spawn (
0 commit comments