Filter PII

I am developer/code-reviewer/debugger/bug-fixer/architect/teacher/builder from dubai, uae
Search for a command to run...

I am developer/code-reviewer/debugger/bug-fixer/architect/teacher/builder from dubai, uae
No comments yet. Be the first to comment.
with T.A.C.T

Isolation is part of a database's ACID guarantees. It ensures that concurrent transactions don't affect each other. The goal is to maintain the state of the data as if transactions are run serially. H

You Should Tell Yourself

A URL shortener is a proxy service that provides a mapping between the short and full representation of a URL. The short URL has the advantage of being small. The service can also provide useful analy

Listening to the Mel Robbins's podcast on regrets was a 'ear'-opener. One can have reqrets of action or inaction. 4 types of reqrets foundation - should've done the work boldness - should've taken t

Python Logging is a centralized place to filter out sensitive Personally Identifiable Information.
The flow chart shows how a LogRecord propagates through the logging frameworks' layers. We can leverage the Filter layer (over the formatter) to redact information.
You can use the convenient Loggingredactor library to do so. The redaction acts on
record.msg which is the format str line that's match across regex patterns
record.args are any parameters that's passed to the log which are interpolated against the format string msg. This checks any dictionary for keys that needs to be redacted.
def filter(self, record):
try:
record.msg, record.args = (
self.redact(record.msg), self.redact(deepcopy(record.args)
)
except Exception:
pass
return True
deepcopyto not mutate the shared (by reference) args objectAlways logs content by returning
True
Wesley's Page provides some nice example of the popular python-json-logger