Fix logger usage

pull/8/head
Nicolas Jouanin 2015-08-21 21:43:54 +02:00
rodzic 2ff81f29bd
commit f1c4d2fe61
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -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_"):