From 251b521274a2151d4515beb3c1411e84e960eae6 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 31 Jan 2020 11:34:27 +0100 Subject: [PATCH] log on_join function --- src/risotto/dispatcher.py | 2 +- src/risotto/register.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/risotto/dispatcher.py b/src/risotto/dispatcher.py index b2e2e08..0abf412 100644 --- a/src/risotto/dispatcher.py +++ b/src/risotto/dispatcher.py @@ -351,7 +351,7 @@ class Dispatcher(register.RegisterDispatcher, CallDispatcher, PublishDispatcher) await log.info_msg(risotto_context, {'arguments': kwargs, 'returns': returns}, - info_msg) + info_msg) # notification if function_obj.get('notification'): notif_version, notif_message = function_obj['notification'].split('.', 1) diff --git a/src/risotto/register.py b/src/risotto/register.py index 45829bf..a5951bc 100644 --- a/src/risotto/register.py +++ b/src/risotto/register.py @@ -9,6 +9,7 @@ from .error import RegistrationError from .message import get_messages from .context import Context from .config import INTERNAL_USER, get_config +from .logger import log def register(uris: str, @@ -234,6 +235,10 @@ class RegisterDispatcher: risotto_context.paths.append(f'{module_name}.on_join') risotto_context.type = None risotto_context.connection = connection + info_msg = _(f'in module {module_name}.on_join') + await log.info_msg(risotto_context, + None, + info_msg) await module.on_join(risotto_context) async def insert_message(self,