Replies: 2 comments 1 reply
Yea they are static because passing the logger down to every corner of every util function is really tiresome. Thought about making it non-static before but that didn't really work in the end that well. |
|
I would say that utility functions probably shouldn't be writing to logs, but that is my preference. I think the least invasive would be to make the global loggers mutable. I'm not picturing a nice way to initialize them dynamically. They could be re-initialized through the config. This debug level thing drove me a bit crazy. Kermit doesn't like the debug level being externally managed. One option would be to completely bypass the Kermit severity check and use |
Uh oh!
There was an error while loading. Please reload this page.
I would love a way to pass a SupabaseLogger to config with an internal implementation that can be inherited by the other modules. I am having trouble doing this in a backwards compatible way.
Maybe the generation function that takes the tag could be specified in the config? The loggers being statically initialized in the plugins makes it hard for me to see how to make the non-ABI breaking. I've implemented it for the
SupabaseClient. I guess I could do the other modules the same way, but I'm not sure what to call the logger. https://github.com/sproctor/supabase-kt/tree/wip/custom-logging I'd like to get your opinion.All reactions