-
Notifications
You must be signed in to change notification settings - Fork 78
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
Allow users to set the maxLogLevel #965
Comments
I think making the log levels configurable isn't easy to do with the way connect has been designed. I thought about it hard for a couple of hours and put it to one side because i couldn't see an obvious solution without a big refactor or nasty trade offs. I started hacking together an approach that would optionally allow passing the The trade-offs of this approach that didn't sit right with me were:
I thought about making this work without that surprising behaviour by modifying smoldot to add a call which could change the options of an already running client. This just pushes the weird behaviour somewhere else though because it changes the options for all clients (we tell the library authors they can treat it as if they have 2 sc clients but really they only have one) Ultimately I don't think this can be done nicely because of the way things are done at the moment. The loglevel is already configured to not filter out debug (but the developer has to remember to unfliter them in the console). But I think we should reconsider the docs for cc @tomaka |
This is not about passing a The options that you pass to |
Yeah that's an approach I'd also already considered but it doesn't address the concern I've outlined above .. we still end up with weird behaviour of the API if |
If we do want to allow people to pass in a different |
Users should be able pass a |
Actually, it's more appropriate to pass these to |
We can't add these to |
Maybe I need to restate things to make it clearer. At the time |
And you solve that by passing a As I've said above: the options that you pass to smoldot and the options passed to |
Moved to a draft PR so its easier to discuss and updated with some of the points in this discussion @tomaka |
After the change in this repo we'd also need to update the |
|
This issue can close as #1027 is merged |
We still need to add the option to the public API |
when users run into trouble with smoldot we have no way of asking them to capture more detailed logs from smoldot. we need a way to control the smoldot
maxLogLevel
when creating a client. E.g. #964The text was updated successfully, but these errors were encountered: