mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-12 15:27:06 +00:00
fix: prevent posthog from sending errors to stderr (#4008)
This commit is contained in:
parent
2b1849f525
commit
c855e18d78
@ -31,8 +31,11 @@ user_id: Optional[str] = None
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# disable posthog logging
|
||||
logging.getLogger("posthog").setLevel(CRITICAL)
|
||||
logging.getLogger("backoff").setLevel(CRITICAL)
|
||||
for module_name in ["posthog", "backoff"]:
|
||||
logging.getLogger(module_name).setLevel(CRITICAL)
|
||||
# Prevent module from sending errors to stderr when an exception is encountered during an emit() call
|
||||
logging.getLogger(module_name).addHandler(logging.NullHandler())
|
||||
logging.getLogger(module_name).propagate = False
|
||||
|
||||
|
||||
class TelemetryFileType(Enum):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user