diff --git a/axion/handler/analysis/__init__.py b/axion/handler/analysis/__init__.py index 727d8bee..4cd4322d 100644 --- a/axion/handler/analysis/__init__.py +++ b/axion/handler/analysis/__init__.py @@ -54,9 +54,9 @@ def analyze( if signature: logger.opt(record=True).error( - 'Unconsumed arguments [{args}] detected in {op_id} handler signature', + 'Unconsumed arguments [{f_args}] detected in {op_id} handler signature', op_id=operation.id, - args=', '.join(arg_key for arg_key in signature.keys()), + f_args=', '.join(arg_key for arg_key in signature.keys()), ) errors.update( exceptions.Error( diff --git a/tests/conftest.py b/tests/conftest.py index 4632ebcb..102accbe 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,11 +34,10 @@ def emit(self, record: logging.LogRecord) -> None: logging.getLogger(record.name).handle(record) logger.enable('axion') - - logger.add( + handler_id = logger.add( LoguruHandler(), format='{message}', ) yield caplog - + logger.remove(handler_id) logger.disable('axion')