MCPcopy Create free account
hub / github.com/OpenRaiser/NanoResearch / filter

Method filter

nanoresearch/cli.py:86–92  ·  view source on GitHub ↗
(self, record: logging.LogRecord)

Source from the content-addressed store, hash-verified

84
85class _SecretRedactionFilter(logging.Filter):
86 def filter(self, record: logging.LogRecord) -> bool:
87 record.msg = _redact_log_text(record.msg)
88 if isinstance(record.args, tuple):
89 record.args = tuple(_redact_log_text(arg) for arg in record.args)
90 elif isinstance(record.args, dict):
91 record.args = {k: _redact_log_text(v) for k, v in record.args.items()}
92 return True
93
94
95_ORIGINAL_LOG_RECORD_FACTORY = logging.getLogRecordFactory()

Callers

nothing calls this directly

Calls 1

_redact_log_textFunction · 0.85

Tested by

no test coverage detected