m8ty_remote_logging
It's hard to replicate some issues and to investigate them by not having the logs. This package should support you in sending the logs to server during the runtime of the application automatically.
Setup the package
Install package
Initialize the package
And that's it :-)
Parameter | Description |
|---|---|
apiKey | Key configured on the server so that you can access the API |
shouldLog | There may be cases that your logger filter is enabled, but you don't want to send the data to the server. By default if the parameter is not set logs will be sent only in Debug Mode |
baseUrl | Url to the server API responsible for logging |
timerDuration | How often should the logs be sent to the server |
metaData | There are default meta data like appName, version, os etc. being send to the server. Here you can define additional metadata like some details about the user (not confidential) |
How does it work behind the scenes
As you are using logger package an listener is automatically attached to that logger. So you are using the logger as usual and the data
Added to the queue
Persisted to the device
Transferred to the server
Removed from the device storage
Offline support
As shared_preferences are used for the persistence of the log entries data will be written locally as long as the device is offline. As soon as the device is online, the data will be transferred to the server.