neovim / pynvim

Python client and plugin host for Nvim
http://pynvim.readthedocs.io/en/latest/
Apache License 2.0
1.47k stars 118 forks source link

import pynvim 'disables' logging globally #521

Closed jeff-dh closed 10 months ago

jeff-dh commented 1 year ago
import logging
import pynvim

logging.error('this will not show up as long as pynvim is imported')

The reason are these lines in pynvim/__init__.py:149ff:

# Required for python 2.6
class NullHandler(logging.Handler):
    def emit(self, record):
        pass

if not logging.root.handlers:
    logging.root.addHandler(NullHandler())
jamessan commented 10 months ago

This was removed as part of #492