Function: redact()
redact(
value):unknown
Defined in: packages/common/src/redaction.ts:139
Returns a copy of value that is safe to write to a log: secret-named keys
replaced, secret-shaped strings scrubbed, Secret-like objects (anything with a
toJSON) reduced to their own toJSON() output, errors flattened (their message
and cause are where keys escape), binary dropped, cycles and excessive depth cut.
Never mutates its input and never throws: a hostile getter or toJSON yields a
marker, not a failed request. It does not decide WHAT may be logged, only that
the shapes above cannot leave the process.
Parameters
value
unknown
Returns
unknown