pappasam / jedi-language-server

A Python language server exclusively for Jedi. If Jedi supports it well, this language server should too.
MIT License
617 stars 45 forks source link

pygls logging level INFO in terminal that launches JupyterLab with jedi-language-server and jupyterlab-lsp #186

Closed selasley closed 2 years ago

selasley commented 2 years ago

The terminal window that starts JupyterLab is flooded with INFO.pygls messages. Michał Krassowski from jupyterlab-lsp thinks this may be an issue with the jedi language server. See

Log level for jupyterlab-lsp <-> pygls setting? #715

python 3.10.1 running under macOS 11.6.2 relevant packages installed:

ipython                   7.30.1
ipython-genutils          0.2.0
jedi                      0.18.1
jedi-language-server      0.34.12
jupyter-client            7.1.0
jupyter-core              4.9.1
jupyter-lsp               1.5.1
jupyter-server            1.13.1
jupyterlab                3.2.5
jupyterlab-code-formatter 1.4.10
jupyterlab-lsp            3.9.2
jupyterlab-pygments       0.1.2
jupyterlab-server         2.9.0
pygls                     0.11.3
python-lsp-jsonrpc        1.0.0
python-lsp-server         1.3.3

Thanks for any help you can provide

krassowski commented 2 years ago

Yup, it looks like pygls logs every step with INFO and the default logging level in jedi-language-server is INFO:

https://github.com/pappasam/jedi-language-server/blob/13297ba1cc109c5f8c2e3b72a82ea79cc9711473/jedi_language_server/cli.py#L105-L118

Should we switch to WARNING by default and allow to bump to either INFO or DEBUG with verbose? Or maybe we need to add --quiet flag? In any case it would be useful if verbosity level could be further tuned beyond info/debug (because of how much pygls is spamming on the info level).

asteppke commented 2 years ago

Thanks for looking into this. I can confirm with the log level set to WARN in cli.py no flood of messages appear in the Jupyter terminal window anymore.