mirror of
https://github.com/dartdavros/chatballs.git
synced 2026-10-05 01:14:58 +03:00
10 lines
253 B
Python
10 lines
253 B
Python
import logging
|
|
|
|
from hub_platform.events.context import get_correlation_id
|
|
|
|
|
|
class CorrelationIdLogFilter(logging.Filter):
|
|
def filter(self, record: logging.LogRecord) -> bool:
|
|
record.correlation_id = get_correlation_id()
|
|
return True
|