I released my app and unfortunately some errors are happening on customer devices. I am trying to understand it for solving but I couldn’t find a way to retrieve logs from a customer device.
Firebase Crashlytics is installed and logging uncaught exceptions but how can I retrieve all app-specific logs from device?
As I see iOS has added OSLogStore at iOS 15+ but there is no practical way to use from Flutter.
What solutions do you use to get recent logs from customer devices without telling your customer plugging their phones to Mac and running some commands on terminal. It can be automatic or remote controlled. Or from a button captioned "Send Device Logs".
2
Answers
Usually, I log few details on Firebase Crashlytics and other internal information(thorough) on AWS CloudWatch for both PROD & DEV environment.
It’s a common approach to create a centralized logging system which you only have to configure once on application startup. You can e.g. use dart’s own
logging
package and configure it differently for debug and release builds.Within your application, you can use it like this
Of course, there is no need to use Crashlytics for that purpose. You can use any different remote logging solution or alternatively records everything to a file. For creating a file and writing to it, you can find more information in the documentation.