-
Notifications
You must be signed in to change notification settings - Fork 53
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
Logger is hardcoded to "trace" #171
Comments
Yes - However - The level passed is what determines what gets filtered and allowed to pass through the console. You can see this being done here. This is where the level passed is used |
IDK. For some reason, after this recent change, my console is all trace, to the point where it's not even useful any longer. It doesn't matter if I pass "logger": "silent", or anything else into my Core, because it gets overwritten w/ "trace" here https://github.com/WalletConnect/walletconnect-utils/blob/master/misc/logger/src/utils.ts#L78 and https://github.com/WalletConnect/walletconnect-utils/blob/master/misc/logger/src/utils.ts#L96 |
|
If I expand the minified code that's being run in generatePlatformLogger() this is what I get:
If I comment out the trace line, or change it to silent, my console is back to good again. |
Hi @johansten! First of all thank you so much for the detailed breakdown of the error. We currently use this logger for Yes - you are absolutely right that So for the most part, what we should focus on the logs being outputted and not the level of the So - if you set your |
I did a barebones example, as it works just as intended. I think there's something deeper going on here: This is what I get from a minimal test, you can see it's going through forwardToConsole, just as you say.
This is what I get in my actual wallet code,
It's not even running through Pino for some reason.. But disabling the trace overwrite makes things work as expected. |
I assume your wallet code is closed source? If it's not can you share it here and I can take a look? If the above is not possible - can you please share some of the trace logs? |
I think the important thing is that I somehow don't get a logger object from Pino. My (I feel like I need to add here that I don't understand the design decision of logging everything, and only filtering what you display. Pino is touted for being lightweight, and fast, because of not doing the work unless it needs doing, and then you go ahead and do all of it anyway) |
The reason we log everything is to access it later for debugging - We keep all trace logs in an array so we can easily debug issues and see where connection is going wrong if anything happens. Can you share how you configure your |
@johansten Hi, the issue has been inactive for a while - did you end up finding the cause of why your repo's logger was always logging to |
Core constructor takes an options object w/ a "logger" entry for customizing the log level, but generatePlatformLogger() then ignores it, using "trace".
The text was updated successfully, but these errors were encountered: