Coverage for documents/loggers.py: 67%
6 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 09:07 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-10 09:07 +0000
1import logging
2import uuid
5class LoggingMixin:
6 def renew_logging_group(self) -> None:
7 """
8 Creates a new UUID to group subsequent log calls together with
9 the extra data named group
10 """
11 self.logging_group = uuid.uuid4()
12 self.log = logging.LoggerAdapter(
13 logging.getLogger(self.logging_name),
14 extra={"group": self.logging_group},
15 )