You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string.
This might allow clean log to provide a facility like log.info(msg, secrets) that ensures the values in secrets are scrubbed from log output. Warrants further research.
The text was updated successfully, but these errors were encountered:
I'd like to explore this as well. But I do want to keep the focus on keeping the library relatively simple.
What about something like using environment variables for the replacer? This would prevent the library from keeping a whitelist. (not saying we use this but just wanting to continue the discussion)
JSON.stringify allows a 2nd argument called
replacer
:This might allow clean log to provide a facility like
log.info(msg, secrets)
that ensures the values insecrets
are scrubbed from log output. Warrants further research.The text was updated successfully, but these errors were encountered: