diff --git a/hbmqtt/plugins/logging.py b/hbmqtt/plugins/logging.py index 5dcc017..04e6008 100644 --- a/hbmqtt/plugins/logging.py +++ b/hbmqtt/plugins/logging.py @@ -10,12 +10,11 @@ from functools import partial class EventLoggerPlugin: def __init__(self, context): - self.logger = logging.getLogger(__name__) self.context = context @asyncio.coroutine def log_event(self, *args, **kwargs): - self.logger.info("### '%s' EVENT FIRED ###" % kwargs['event_name'].replace('old', '')) + self.context.logger.info("### '%s' EVENT FIRED ###" % kwargs['event_name'].replace('old', '')) def __getattr__(self, name): if name.startswith("on_"):