Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send log messages to client #85

Closed
gabro opened this issue Dec 2, 2017 · 4 comments · Fixed by #104
Closed

Send log messages to client #85

gabro opened this issue Dec 2, 2017 · 4 comments · Fixed by #104

Comments

@gabro
Copy link
Member

gabro commented Dec 2, 2017

LSP supports sending log messages to the client, using connection.logMessage.
Those messages are then handled by the client in different ways, for instance VSCode displays them in the Scalameta output channel.

I think it would be more convenient than outputting to a file like we do now, or at least we could have both, so that one can access those logs more conveniently without leaving the editor.

@gabro gabro added the tech debt We should have addressed this yesterday label Dec 2, 2017
@olafurpg
Copy link
Member

olafurpg commented Dec 2, 2017

We can maybe use a custom logback appender https://logback.qos.ch/manual/appenders.html to take care of this. We can then configure two appenders in logback.xml instead of only ConsoleAppender. For starters, we can probably get away with a global mutable Notifications object that is set by the LSP server on initialize. WDYT?

@olafurpg
Copy link
Member

olafurpg commented Dec 2, 2017

Why is this labeled "tech debt" btw? For me this is an lsp feature!

@gabro gabro removed the tech debt We should have addressed this yesterday label Dec 3, 2017
@gabro
Copy link
Member Author

gabro commented Dec 3, 2017

Why is this labeled "tech debt" btw? For me this is an lsp feature!

My mistake!

@gabro
Copy link
Member Author

gabro commented Dec 3, 2017

We can maybe use a custom logback appender logback.qos.ch/manual/appenders.html to take care of this. We can then configure two appenders in logback.xml instead of only ConsoleAppender. For starters, we can probably get away with a global mutable Notifications object that is set by the LSP server on initialize. WDYT?

I was thinking the same about the custom appender: It would be nice to do this without changing how we log right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants