Closed alexrass closed 1 month ago
Hey @alexrass, I'm not able to effectively reproduce this problem with the information provided in this issue. Please provide details of the environment in which you're running this code. Browser, node, bun?
Perhaps you have an unclosed group elsewhere that is nesting all subsequent logs? What does the output look like that you're reporting is weird?
I'm happy to help resolve this, but I need more information.
Hi @alexrass ,
Again, I'm not able to reproduce the issue based on the information provided and by running my own tests to confirm that it is working as intended. I will be closing this ticket soon unless you are able to respond with more details. If the issue persists, please open another ticket and be sure to provide more details about your issue. Thank you!
Ahh sorry -- this is in google chrome. No other nested grouping -- I could replicate directly in the console outside of my codebase
Your problem is your logger is not calling the seal()
method.
// incorrect
const l = logger.withEmoji;
// correct
const l = logger.withEmoji.seal();
When you don't call seal, what's happening is that each time you call l.something
your modifying the same log instance rather than creating a new one.
Refer to this page of the docs: https://adzejs.com/getting-started/setup.html#create-a-shared-logger
That results in some weird output, extra groupings, and logs no longer working