Skip to content

log messages from language server appear in Error Log view in Eclipse #1742

Closed

Description

@martinlippert

I've seen (more or less random) log messages from the language server appearing in the Error Log view in Eclipse. For example:

12:42:39.475 [Reconciler-1] INFO  o.s.i.v.b.j.u.CompilationUnitCache - CU Cache: start work on AST for file:///<path-to-file>/gs-rest-service-complete/src/main/java/com/example/restservice/GreetingController.java

or

09:14:44.401 [Simple-Language-Server main thread] INFO  o.s.i.v.boot.app.SpringSymbolIndex - Update document [file changed]: file:///<path-to-file>/gs-rest-service-complete/target/classes/META-INF/maven/com.example/rest-service-complete/pom.properties

They look like regular INFO messages from the language server, so I am wondering why they appear in the Error Log view - and definitely not all of them.

(I am running Spring Tools for Eclipse 5.0.0.RELASE)

Activity

  1. added this to the 5.1.0.RELEASE milestone on Dec 18, 2025
  2. martinlippert commented on Dec 18, 2025

    @martinlippert
    MemberAuthor

    After enabling the logging to the console to see what is going on inside of the language server and then restarting the IDE, almost all the log messages appear in the Error Log view. Not sure if that is related to enabling the logging to the console or not, but it is definitely super annoying.

  3. martinlippert commented on Dec 18, 2025

    @martinlippert
    MemberAuthor

    Interestingly switching back to not log the output of the language server to the console, fewer messages appear in the Error Log view.

  4. martinlippert commented on Dec 18, 2025

    @martinlippert
    MemberAuthor

    It looks like the log messages from the language server are being routed to the error output stream of the language server process. If the user enables the logging to the console (for the Spring language server), we redirect the output from the error stream to the console. If not, we consume all the content of the error stream.

    At the same time, lsp4e seems to read and consume all the content of the error stream as well, putting every line of it on the Eclipse error log (therefore it shows up on the Error Log view). It looks like that the different mechanisms that read the error stream are concurrently fighting for error messages and some of them get consumed by one consumer while others get consumed by another one.

    Since we probably need to continue to stream the logs out to the error pipe (the regular in and out streams are reserved for the language server procotol communication), it might make sense to not forward this as the error log stream to lsp4e, but either create a null stream for lsp4e or only forward error messages from the log to the stream that lsp4e then sees.

    Changing the default log level of the language server is probably another angle to look at this as well, but we should do that in a separate, independent issue.

  5. martinlippert commented on Dec 18, 2025

    @martinlippert
    MemberAuthor

    Marking this as a patch candidate for a potential 5.0.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions