-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: About maskStrings parameter #40
Comments
Hi @pegasuspect, thanks again and I appreciate a new issue. I would appreciate to hear you thoughts on this. |
I think its OK to maskStrings either way, the only thing is it must be made obvious in the documentation what it does. Like you explained you might add: It will also mask keys if it encounters this random string. The naming of the parameter could also help in understanding it. maskStrings is a little general name. It might be maskAllOccurances, or if you wanna keep it short maskAny. Because when you say strings to me it means literal json string type, as if its not gonna work with number. To somebody else it might mean different as well. |
Fix #40, Rename maskStrings into maskAny
Thank you @pegasuspect for your valuable input. I also believe that this name is misleading and have therefore decided to rename it and also clarify in the documentation. I have just released a new
|
Describe the bug
When maskStrings parameter is used tslog is masking the keys as well and also adding an extra colon. Also the maskStrings works case sensitive unlike maskValuesOfKeys. See the screenshot below.
To Reproduce
Steps to reproduce the behavior:
mkdir tslogBugMaskStrings
cd tslogBugMaskStrings
npm init -y
npm i tslog
touch index.js
perhapsExpected behavior
There should be one colon after the key and if it is not intended, keys should not be masked.
Screenshots
![](https://camo.githubusercontent.com/6253e45aec6a4c2ce3f59b3ce854dfeefc5376f2fbbb0028c6a8bf089bf1511a/68747470733a2f2f692e696d6775722e636f6d2f41487633396a6a2e706e67)
Additional context
I added this as a separate issue to keep things cleaner with issue #37
The text was updated successfully, but these errors were encountered: