def logmethod(func):
    @wraps(func)
    def wrapper(self, *args, **kwargs):
        if not init or not self.debug_enabled:
            return
        if self._logger is None:
            self._logger = getLogger(getattr(self, 'name', 'unknown'))
        return func(self, *args, **kwargs)
    return wrapper
Decorator for setting up the logger in LoggingMixin subclasses.
dataset/ETHPy150Open Shougo/deoplete.nvim/rplugin/python3/deoplete/logger.py/logmethod