File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ export class LanguageClientManager {
443
443
documentSelector : LanguageClientManager . documentSelector ,
444
444
revealOutputChannelOn : langclient . RevealOutputChannelOn . Never ,
445
445
workspaceFolder : workspaceFolder ,
446
- outputChannel : new SwiftOutputChannel ( "SourceKit Language Server" ) ,
446
+ outputChannel : new SwiftOutputChannel ( "SourceKit Language Server" , false ) ,
447
447
middleware : {
448
448
provideDocumentSymbols : async ( document , token , next ) => {
449
449
const result = await next ( document , token ) ;
Original file line number Diff line number Diff line change @@ -18,23 +18,25 @@ import configuration from "../configuration";
18
18
export class SwiftOutputChannel implements vscode . OutputChannel {
19
19
private channel : vscode . OutputChannel ;
20
20
private logStore = new RollingLog ( 1024 * 1024 * 5 ) ;
21
+ private logToConsole : boolean ;
21
22
22
23
public name : string ;
23
24
24
25
/**
25
26
* Creates a vscode.OutputChannel that allows for later retrival of logs.
26
27
* @param name
27
28
*/
28
- constructor ( name : string ) {
29
+ constructor ( name : string , logToConsole : boolean = true ) {
29
30
this . name = name ;
31
+ this . logToConsole = process . env [ "CI" ] !== "1" && logToConsole ;
30
32
this . channel = vscode . window . createOutputChannel ( name ) ;
31
33
}
32
34
33
35
append ( value : string ) : void {
34
36
this . channel . append ( value ) ;
35
37
this . logStore . append ( value ) ;
36
38
37
- if ( process . env [ "CI" ] !== "1" ) {
39
+ if ( this . logToConsole ) {
38
40
console . log ( value ) ;
39
41
}
40
42
}
@@ -43,7 +45,7 @@ export class SwiftOutputChannel implements vscode.OutputChannel {
43
45
this . channel . appendLine ( value ) ;
44
46
this . logStore . appendLine ( value ) ;
45
47
46
- if ( process . env [ "CI" ] !== "1" ) {
48
+ if ( this . logToConsole ) {
47
49
console . log ( value ) ;
48
50
}
49
51
}
You can’t perform that action at this time.
0 commit comments