We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a70415 commit e921d06Copy full SHA for e921d06
ellar/di/utils.py
@@ -1,10 +1,15 @@
1
+import logging
2
import typing as t
3
4
+logger = logging.getLogger("ellar")
5
+
6
7
@t.no_type_check
8
def fail_silently(func: t.Callable, *args: t.Any, **kwargs: t.Any) -> t.Optional[t.Any]:
9
try:
10
return func(*args, **kwargs)
- except Exception as ee: # pragma: no cover
- print(ee)
11
+ except Exception as ex: # pragma: no cover
12
+ logger.debug(
13
+ f"Calling {func} with args: {args} kw: {kwargs} failed\nException: {ex}"
14
+ )
15
return None
0 commit comments