tslog
tslog copied to clipboard
Bug: JSON type returning hostname and instance name when supposed to be hidden by default
Describe the bug The json type is returning the full logObject regardless of the values provided to be hidden/displayed in the settings.
To Reproduce Steps to reproduce the behavior:
- Create new Logger with settings param {type: 'json'}
- Pass a string to Logger instance to see the output.
Expected behavior The log output when formatted as json should not display the values that are supposed to be hidden by default. Ie. hostname, instancename.
Node.js Version 14.16.0
OS incl. Version macOS 10.15.7
@blakejoy Please, did you get a way around this?
I ended up not using this @hydeenoble 🥲
There is a new, completely rewritten version (4.0) which handles it completely different and should solve this out of the box. In addition, you can also overwrite every step of the log process. Give it a go and let me know if that solves your problem:
-
npm i tslog@next
-
and run it with
node --enable-source-maps
or for TypeScriptnode --enable-source-maps --experimental-specifier-resolution=node --no-warnings --loader ts-node/esm
Thanks.
V4 is released now, so I'm going to close this issue. Feel free to open a new one if V4 didn't solve it for you.
Here are the docs: tslog.js.org