Skip to content
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: JSON type returning hostname and instance name when supposed to be hidden by default #110

Closed
blakejoy opened this issue Jun 15, 2021 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@blakejoy
Copy link

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:

  1. Create new Logger with settings param {type: 'json'}
  2. 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 blakejoy added the bug Something isn't working label Jun 15, 2021
@hydeenoble
Copy link

hydeenoble commented Jul 29, 2021

@blakejoy Please, did you get a way around this?

@blakejoy
Copy link
Author

I ended up not using this @hydeenoble 🥲

@terehov terehov added this to the V4 milestone Aug 23, 2022
@terehov
Copy link
Contributor

terehov commented Sep 30, 2022

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 TypeScript node --enable-source-maps --experimental-specifier-resolution=node --no-warnings --loader ts-node/esm

Thanks.

@terehov
Copy link
Contributor

terehov commented Nov 15, 2022

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

@terehov terehov closed this as completed Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants