Bugfender SDK stores logs temporarily in the mobile device's internal memory until they are sent to the server. This buffering helps sending the logs later in case the mobile device does not have network connectivity.
Why is there a storage limit?
In case the mobile device never connects to the Internet, or if it's not enabled to send logs to Bugfender server at the moment, we need to have a maximum storage size in order to prevent that your application takes all the disk space available in the mobile device, which certainly would annoy your users.
Do disabled mobile devices store logs on disk?
Yes, they do. When you enable a device for the first time after being disabled, all logs stored in the disk are flushed.
In which part of the internal memory are logs stored?
Access is restricted exclusively to the application by operating system file permissions.
On iOS, logs are stored in the cache directory. This gives the operating system a chance to delete them if low on disk space.
Is there a way to tell when the limit has been hit?
Yes, a special log called "bf_gap_log" is written to signal some logs are missing.
Changing the limit
There is a configuration method to change the maximum allowed capacity of this cache, since a mobile device that is kept offline for a long time could potentially accumulate too much data and fill up the internal memory of the device. The default value 5 MB, but you can change it with setMaximumLocalStorageSize.
For example in Android:
Bugfender.setMaximumLocalStorageSize(10*1024*1024); // 10 MB
Or in iOS (Objective-C):
[Bugfender setMaximumLocalStorageSize:10*1024*1024]; // 10 MB
Or in iOS (Swift):
Bugfender.setMaximumLocalStorageSize(10*1024*1024) // 10 MB
Logs are stored in the internal memory of the application, inaccessible by other applications.