-
Notifications
You must be signed in to change notification settings - Fork 119
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
Logging module not working after import pynvim #373
Comments
Comment out logging change in
|
we could skip that section for python3+ |
Should it just be moved to |
Is there any workaround for this? |
I've found 2 workarounds for this. First, remove the NullHandler after you've imported from pynvim import NullHandler
# Remove the NullHandler from the root logger if it's there.
# see: https://github.com/neovim/pynvim/issues/373
for handler in logging.root.handlers:
if isinstance(handler, NullHandler):
logging.root.removeHandler(handler)
# now add your config
logging.basicConfig(level=args.loglevel) Alternatively, you can setup logging before the import of pynvim: import logging
# Set up your logging.
logging.basicConfig(level=logging.DEBUG)
# Now, import pynvim
import pynvim |
Nothing would write to
/tmp/coc-jedi.log
, withoutimport pynvim
, it works as expected.The text was updated successfully, but these errors were encountered: