kopia lustrzana https://github.com/Yakifo/amqtt
Fix logger usage
rodzic
2ff81f29bd
commit
f1c4d2fe61
|
@ -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_"):
|
||||
|
|
Ładowanie…
Reference in New Issue