File tree Expand file tree Collapse file tree
packages/opencode/src/lsp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,13 +131,13 @@ export async function create(input: { serverID: string; server: LSPServer.Handle
131131 new StreamMessageReader ( input . server . process . stdout as any ) ,
132132 new StreamMessageWriter ( input . server . process . stdin as any ) ,
133133 )
134- // LSP servers rarely write to stderr - when they do, it's almost always a
135- // misconfiguration (wrong binary, bad args, missing deps) that otherwise
136- // manifests as a silent 45s initialize timeout. Surface it at error level so
137- // operators don't have to hunt .
134+ // Server stderr can contain both real errors and routine informational logs,
135+ // which is normal stderr practice for some tools. Keep the raw stream at
136+ // debug so users can opt in with --print-logs --log- level DEBUG without
137+ // polluting normal logs .
138138 input . server . process . stderr ?. on ( "data" , ( data : Buffer ) => {
139139 const text = data . toString ( ) . trim ( )
140- if ( text ) l . error ( "server stderr" , { text : text . slice ( 0 , 1000 ) } )
140+ if ( text ) l . debug ( "server stderr" , { text : text . slice ( 0 , 1000 ) } )
141141 } )
142142
143143 const pushDiagnostics = new Map < string , Diagnostic [ ] > ( )
You can’t perform that action at this time.
0 commit comments