@@ -8,7 +8,6 @@ import * as nls from 'vscode-nls'
88import { LanguageClient , LanguageClientOptions , RequestType , State } from 'vscode-languageclient'
99import { InlineCompletionManager } from '../app/inline/completion'
1010import { AmazonQLspAuth , encryptionKey , notificationTypes } from './auth'
11- import { RotatingLogChannel } from './rotatingLogChannel'
1211import {
1312 CreateFilesParams ,
1413 DeleteFilesParams ,
@@ -95,23 +94,6 @@ export async function startLanguageServer(
9594
9695 const clientId = 'amazonq'
9796 const traceServerEnabled = Settings . instance . isSet ( `${ clientId } .trace.server` )
98-
99- // Create custom output channel that writes to disk but sends UI output to the appropriate channel
100- const lspLogChannel = new RotatingLogChannel (
101- traceServerEnabled ? 'Amazon Q Language Server' : 'Amazon Q Logs' ,
102- extensionContext ,
103- traceServerEnabled
104- ? vscode . window . createOutputChannel ( 'Amazon Q Language Server' , { log : true } )
105- : globals . logOutputChannel
106- )
107-
108- // Add cleanup for our file output channel
109- toDispose . push ( {
110- dispose : ( ) => {
111- lspLogChannel . dispose ( )
112- } ,
113- } )
114-
11597 let executable : string [ ] = [ ]
11698 // apply the GLIBC 2.28 path to node js runtime binary
11799 if ( isSageMaker ( ) ) {
@@ -210,9 +192,15 @@ export async function startLanguageServer(
210192 } ,
211193 } ,
212194 /**
213- * Using our RotatingLogger for all logs
195+ * When the trace server is enabled it outputs a ton of log messages so:
196+ * When trace server is enabled, logs go to a seperate "Amazon Q Language Server" output.
197+ * Otherwise, logs go to the regular "Amazon Q Logs" channel.
214198 */
215- outputChannel : lspLogChannel ,
199+ ...( traceServerEnabled
200+ ? { }
201+ : {
202+ outputChannel : globals . logOutputChannel ,
203+ } ) ,
216204 }
217205
218206 const client = new LanguageClient (
0 commit comments