Closed Vinzent03 closed 1 month ago
@dshukertjr For now, I've only added logging to the gotrue package. What do you think of this? If you consent, I would add this to the rest of the packages.
This is awesome! I love it so much!
I've noticed that we should be careful with what data we log, especially sensitive data. So I've come up with the idea that records with level FINEST
contain sensitive data like session data, or which postgrest urls are called. So that those records shouldn't be sent to sentry or similar without making such things clear in privacy notes. Let me know what you think of this approach and the documentation in the README of the supabase_flutter
package, so I can add that section to the other packages as well.
I see now that there is no documentation in the README of the rest of the packages. So I would leave it for now only in the supabase_flutter package and you? or I? add it to the supabase website documentation.
What kind of change does this PR introduce?
feature
What is the current behavior?
When debugging the auth broadcasting or the realtime/stream fixed I had to manually add many print statements, which was annoying. The js sdk already has some logging.
What is the new behavior?
Add logging via the logging package from dart.dev. This primarily only tracks the logs. When
debug
is true in the supabase_flutterSupabase
instance, records with levelINFO
or higher are printed. The logger instances are laid in a hierarchy separated by dots, which allows all supabase loggers to be united in asupabase
logger instance.