@@ -22,7 +22,6 @@ import {
22
22
} from '@aws/language-server-runtimes/protocol'
23
23
import { AuthUtil , CodeWhispererSettings , getSelectedCustomization } from 'aws-core-vscode/codewhisperer'
24
24
import {
25
- Settings ,
26
25
oidcClientName ,
27
26
createServerOptions ,
28
27
globals ,
@@ -36,6 +35,7 @@ import {
36
35
} from 'aws-core-vscode/shared'
37
36
import { activate } from './chat/activation'
38
37
import { AmazonQResourcePaths } from './lspInstaller'
38
+ import { getLspLogLevel } from './config'
39
39
40
40
const localize = nls . loadMessageBundle ( )
41
41
const logger = getLogger ( 'amazonqLsp.lspClient' )
@@ -61,11 +61,11 @@ export async function startLanguageServer(
61
61
serverModule,
62
62
execArgv : argv ,
63
63
} )
64
-
64
+ const clientId = `amazonq`
65
65
const documentSelector = [ { scheme : 'file' , language : '*' } ]
66
+ const lspLogSettings = getLspLogLevel ( clientId )
66
67
67
- const clientId = 'amazonq'
68
- const traceServerEnabled = Settings . instance . isSet ( `${ clientId } .trace.server` )
68
+ getLogger ( 'amazonqLsp' ) . info ( `Sending log settings to lsp: %O` , lspLogSettings )
69
69
70
70
await validateNodeExe ( resourcePaths . node , resourcePaths . lsp , argv , logger )
71
71
@@ -139,6 +139,7 @@ export async function startLanguageServer(
139
139
} ,
140
140
} ,
141
141
} ,
142
+ logLevel : lspLogSettings . lspLogLevel ,
142
143
credentials : {
143
144
providesBearerToken : true ,
144
145
} ,
@@ -148,7 +149,7 @@ export async function startLanguageServer(
148
149
* When trace server is enabled, logs go to a seperate "Amazon Q Language Server" output.
149
150
* Otherwise, logs go to the regular "Amazon Q Logs" channel.
150
151
*/
151
- ...( traceServerEnabled
152
+ ...( lspLogSettings . seperateTraceChannel
152
153
? { }
153
154
: {
154
155
outputChannel : globals . logOutputChannel ,
0 commit comments