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

Provide a way to disable logging #273

Closed
akurtakov opened this issue Nov 30, 2020 · 7 comments
Closed

Provide a way to disable logging #273

akurtakov opened this issue Nov 30, 2020 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@akurtakov
Copy link
Contributor

I haven't found a way to disable logging for the server.

@skovhus
Copy link
Collaborator

skovhus commented Nov 30, 2020

I haven't found a way to disable logging for the server.

Which logging would you like to disable?

@akurtakov
Copy link
Contributor Author

All of:

[Log] Initialized server v. 1.16.1 for file:///~~~~~~~~~~
[Log] Analyzing files matching glob "**/*@(.sh|.inc|.bash|.command)" inside ~~~~~~~~~
[Log] Glob resolved with 1 files after 0.055 seconds
[Log] Analyzing file:///~~~~~~~~~~~.sh
[Log] Analyzer finished after 0.068 seconds
[Log] onDocumentHighlight 11:13 word=null
[Log] onDocumentHighlight 11:13 word=null
[Log] onDocumentSymbol
[Log] onDocumentHighlight 18:28 word="MISSING_ENVS"
[Log] onHover 11:12 word=null
[Log] onDocumentHighlight 11:13 word=null
[Log] onHover 8:13 word=null
[Log] onDocumentHighlight 8:13 word=null
[Log] onHover 16:4 word="eval"
[Log] onDocumentHighlight 16:2 word="eval"
[Log] onHover 9:1 word=null

vrubezhny added a commit to vrubezhny/bash-language-server that referenced this issue Dec 2, 2020
This adds a `verbose` option to LS configuration. The default value is `verbose=true` enables the messages to be logged
using `connection.console.log(message)`,  while `verbose=false` disables any messages to be logged.
This doesn't change the logging of any other types, f.i. when `connection.console.warn(message)`  is used the message will be
sent to console regardless of value of `verbose` option.

Signed-off-by: Victor Rubezhny <[email protected]>
@skovhus skovhus added enhancement New feature or request help wanted good first issue Good for newcomers labels Nov 25, 2022
@skovhus
Copy link
Collaborator

skovhus commented Dec 9, 2022

@vrubezhny @akurtakov I'm trying to prioritize solving this. But I'm curious how common is it that you are actually annoyed by these logs? For the VS Code client you never see the logs unless you specifically go to "output -> Bash IDE".

@akurtakov
Copy link
Contributor Author

It would be nice to have as Eclipse LSP4E defaults to print everything to the console when developing so there is ton of lsp messages but it's not end user visible thing.

@skovhus
Copy link
Collaborator

skovhus commented Dec 9, 2022

Eclipse LSP4E defaults to print everything to the console

That’s odd. Can you paste a screenshot?

@akurtakov
Copy link
Contributor Author

Here it is
image

@skovhus skovhus mentioned this issue Jan 9, 2023
@skovhus
Copy link
Collaborator

skovhus commented Jan 24, 2023

@akurtakov some weeks ago a new version of the server was released that supports configuring logging. See more documentation here: https://github.com/bash-lsp/bash-language-server#logging

Let me know if this works for you. You cannot currently disable all logging, but you can set the logging level to error, which I hope solves the problem for you.

@skovhus skovhus closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants