mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Add workaround for python bug to HAQueueHandler (#66541)
This commit is contained in:
parent
cb03db8df4
commit
2538af4b06
@ -33,6 +33,15 @@ class HideSensitiveDataFilter(logging.Filter):
|
||||
class HomeAssistantQueueHandler(logging.handlers.QueueHandler):
|
||||
"""Process the log in another thread."""
|
||||
|
||||
def prepare(self, record: logging.LogRecord) -> logging.LogRecord:
|
||||
"""Prepare a record for queuing.
|
||||
|
||||
This is added as a workaround for https://bugs.python.org/issue46755
|
||||
"""
|
||||
record = super().prepare(record)
|
||||
record.stack_info = None
|
||||
return record
|
||||
|
||||
def handle(self, record: logging.LogRecord) -> Any:
|
||||
"""
|
||||
Conditionally emit the specified logging record.
|
||||
|
Loading…
x
Reference in New Issue
Block a user