Function: redactXml()
ts
function redactXml(xml): string;Defined in: netconf/src/logger.ts:146
Default redaction for logged XML. All text inside an element whose local name looks secret (such as password, authentication-key, community or token; not public-key) is replaced with ***, CDATA included and at any depth. Elsewhere, URL userinfo (ftp://user:pw@host) becomes ftp://***@host. Everything else is kept exactly as it was.
It scans the text rather than parsing it, so it never throws: a malformed message, which is often the one worth tracing, is still redacted. Message bodies are only logged at trace level, and only through this function (or one the caller supplies).
Parameters
xml
string
Returns
string