'Flutter - What to log and how to save to could or database?

I am trying to implement logging in my Flutter App. I watched a few videos that give an idea on how to go about it. However, I couldn't find a video that shows what (other than error messages) all things should be logged. Should I insert a log in every function?

This does give some idea though. To Log Or To Not Log?

Another question that I have is how to save these logs to DB or cloud? I am using Flutter logger package. But it does not have the feature to upload to cloud. Do I need to use something like Sentry or Firebase Crashlytics? Do you have a sample code to show how to save the logs online?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source