MCPcopy Index your code
hub / github.com/tiny-pilot/tinypilot / log_sensitive

Method log_sensitive

app/log.py:46–55  ·  view source on GitHub ↗
(self, level, message, *args, **kws)

Source from the content-addressed store, hash-verified

44 """
45
46 def log_sensitive(self, level, message, *args, **kws):
47 if self.isEnabledFor(level):
48 # Since we do string concatenation here, we cast the message to
49 # string explicitly, just to avoid potential type errors if someone
50 # passes an Error object for example.
51 # The closing marker is needed, because a log message might contain
52 # newlines. Otherwise, we wouldn’t be able to tell in hindsight how
53 # many lines a log message consists of.
54 self._log(level, '[SENSITIVE] ' + str(message) + ' [/SENSITIVE]',
55 args, **kws)
56
57 def debug_sensitive(self, message, *args, **kws):
58 self.log_sensitive(logging.DEBUG, message, *args, **kws)

Callers 4

debug_sensitiveMethod · 0.95
info_sensitiveMethod · 0.95
warning_sensitiveMethod · 0.95
error_sensitiveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected