MCPcopy Create free account
hub / github.com/hynek/structlog / DummyHandler

Class DummyHandler

tests/test_stdlib.py:1459–1466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457 records: dict[str, logging.LogRecord] = {}
1458
1459 class DummyHandler(logging.Handler):
1460 def emit(self, record):
1461 # Don't do anything; just store the record in the records dict
1462 # by its message, so we can assert things about it.
1463 if isinstance(record.msg, dict):
1464 records[record.msg["event"]] = record
1465 else:
1466 records[record.msg] = record
1467
1468 stdlib_logger = logging.getLogger()
1469 structlog_logger = get_logger()

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…