❎ X-out confidential data in log entries of a Studio Log stream.
const logger = ;const logX = ;const log = ;log;loginput'db' connection: login: 'admin' password: 'secret' ;
The above produces this log output:
Data objects are copied before modification to make it save to pass object references as log data.
The API consist of a single default function:
(path...): Returns a transform stream in object mode that filters the properties at the given paths.
(map): Maps topic names to filters. The special
*topic is used if no matching topic filter was specified.
key: Property access.
key.path: Property path access.
items: Array index access.
items[':a']: Quoted property access.
item.*: All values in object.
items[*]: All entries in array.
item.*.key: Property access in each value of object.
items[*].key: Property access in each entry of array.