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: level prop in browser doesn't work #418

Closed
slavasitnikov opened this issue May 23, 2018 · 5 comments · Fixed by #419
Closed

Bug: level prop in browser doesn't work #418

slavasitnikov opened this issue May 23, 2018 · 5 comments · Fixed by #419
Labels

Comments

@slavasitnikov
Copy link
Contributor

http://getpino.io/#/docs/API?id=level

Changing minimum logging level doesn't work as described in the documentation.

const pino = require("pino")({
  level: "info"
});

pino.info("display. OK");
pino.trace("doens't display. OK");

pino.level = "trace";
pino.trace("doens't display. ERROR");

pino version: 4.16.1

@mcollina
Copy link
Member

ouch! Would you like to send a PR?

@jsumners jsumners added the bug label May 23, 2018
@davidmarkclements
Copy link
Member

this is also a docs problem

the browser API and the server API are not the same, we might need create a browser API section

@davidmarkclements
Copy link
Member

the reason dynamic level wasn't included in browser pino is as follows

  • browser pino needs to be as small a payload as possible
  • there isn't a strong use case for setting the level dynamically (instead of via config) – EXCEPT for debugging
  • first pass at browser pino therefore didn't include dynamic level setting

However, if we consider this a must-have, then that's cool let's put it in

@slavasitnikov
Copy link
Contributor Author

@mcollina ok, i'll do it

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants