How to use the aiozmq.rpc.log.logger.exception function in aiozmq

To help you get started, we’ve selected a few aiozmq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aio-libs / aiozmq / aiozmq / rpc / base.py View on Github external
def try_log(self, fut, name, args, kwargs):
        try:
            fut.result()
        except Exception as exc:
            if self.log_exceptions:
                for e in self.exclude_log_exceptions:
                    if isinstance(exc, e):
                        return
                logger.exception(textwrap.dedent("""\
                    An exception from method %r call occurred.
                    args = %s
                    kwargs = %s
                    """),
                    name, pprint.pformat(args), pprint.pformat(kwargs))  # noqa
github aio-libs / aiozmq / aiozmq / rpc / pubsub.py View on Github external
def process_call_result(self, fut, *, name, args, kwargs):
        self.discard_pending(fut)
        try:
            if fut.result() is not None:
                logger.warning("PubSub handler %r returned not None", name)
        except asyncio.CancelledError:
            return
        except (NotFoundError, ParametersError) as exc:
            logger.exception("Call to %r caused error: %r", name, exc)
        except Exception:
            self.try_log(fut, name, args, kwargs)
github aio-libs / aiozmq / aiozmq / rpc / pipeline.py View on Github external
def process_call_result(self, fut, *, name, args, kwargs):
        self.discard_pending(fut)
        try:
            if fut.result() is not None:
                logger.warning("Pipeline handler %r returned not None", name)
        except (NotFoundError, ParametersError) as exc:
            logger.exception("Call to %r caused error: %r", name, exc)
        except asyncio.CancelledError:
            return
        except Exception:
            self.try_log(fut, name, args, kwargs)