@@ -53,11 +53,11 @@ export class Logger {
5353
5454 static error ( ex : Error , classOrMethod ?: string , ...params : any [ ] ) : void {
5555 if ( this . debug ) {
56- console . error ( this . timestamp , ConsolePrefix , classOrMethod , ex , ...params ) ;
56+ console . error ( this . timestamp , ConsolePrefix , classOrMethod , ...params , ex ) ;
5757 }
5858
5959 if ( this . output !== undefined && this . level !== OutputLevel . Silent ) {
60- this . output . appendLine ( ( this . debug ? [ this . timestamp , classOrMethod , ex , ...params ] : [ classOrMethod , ex , ...params ] ) . join ( ' ' ) ) ;
60+ this . output . appendLine ( ( this . debug ? [ this . timestamp , classOrMethod , ...params , ex ] : [ classOrMethod , ...params , ex ] ) . join ( ' ' ) ) ;
6161 }
6262
6363 // Telemetry.trackException(ex);
@@ -80,12 +80,12 @@ export class Logger {
8080
8181 static gitOutput : OutputChannel | undefined ;
8282
83- static logGitCommand ( command : string , cwd : string ) : void {
83+ static logGitCommand ( command : string , cwd : string , ex ?: Error ) : void {
8484 if ( this . level !== OutputLevel . Debug ) return ;
8585
8686 if ( this . gitOutput === undefined ) {
8787 this . gitOutput = window . createOutputChannel ( `${ ExtensionOutputChannelName } (Git)` ) ;
8888 }
89- this . gitOutput . appendLine ( `${ this . timestamp } ${ command } (${ cwd } )` ) ;
89+ this . gitOutput . appendLine ( `${ this . timestamp } ${ command } (${ cwd } )${ ex === undefined ? '' : `\n\n ${ ex . toString ( ) } ` } ` ) ;
9090 }
9191}
0 commit comments