-
Notifications
You must be signed in to change notification settings - Fork 845
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
Childlogger Loglevel not respected in the browser #960
Comments
Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
I have the same problem in the browser. @mcollina As this feature will be quite handy in the upcoming future for us, I will look into it. |
The fix in #1725 only works partially. Setting the level via const root = pino({ level: "info" })
root.info("OK: root info WILL be logged.")
root.debug("OK: root debug will NOT be logged.")
const child1 = root.child({})
child1.level = "debug"
child1.info("OK: child1 info WILL be logged.")
child1.debug("OK: child1 debug WILL be logged.")
const child2 = root.child({}, { level: "debug" })
child2.info("OK: child2 info WILL be logged.")
child2.debug("ERROR: child2 debug will NOT be logged.") // <-- |
@GeorgEchterling the code for the browser logger takes a while to get into. Don't know if I will manage to work on it in the near future to fix this issue. |
Hi,
I am using pino in the browser, since I have some parts of my application that are used in the browser as well as on node.
When using pino in the browser, it seems that different log levels for Child loggers are not working:
Here is my root logger
The output looks like this
It seems the level for the child logger, is just taken as additional property, instead of changing the level of the child logger.
The text was updated successfully, but these errors were encountered: