From 8340d5fd7d25b61ddb362335c62a2c6cd52a2563 Mon Sep 17 00:00:00 2001 From: whysage Date: Mon, 8 Nov 2021 20:04:20 +0200 Subject: [PATCH] #509 Use logging for providers error. --- src/dependency_injector/providers.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dependency_injector/providers.pyx b/src/dependency_injector/providers.pyx index e2da213b..d5697411 100644 --- a/src/dependency_injector/providers.pyx +++ b/src/dependency_injector/providers.pyx @@ -6,6 +6,7 @@ import copy import errno import functools import inspect +import logging import os import re import sys @@ -207,7 +208,7 @@ cdef class Provider(object): try: result = self._provide(args, kwargs) except Exception as exc: - print(self) + logging.debug(str(self)) raise exc if self.is_async_mode_disabled():