cordova-plugin-background-geolocation icon indicating copy to clipboard operation
cordova-plugin-background-geolocation copied to clipboard

Very large logback.db size

Open heartmon opened this issue 4 years ago • 2 comments

Hi! We use the plugin for our cordova app. We saw that we got 1 GB of user data of our app and found that it's all because of logback.db. Is there anyway to turnoff logging? or does anyone have an idea what I might have done wrong for the APK?

Thank you!

Your Environment

  • Plugin version: 2.3.6
  • Platform: Android
  • OS version: 9
  • Device manufacturer and model: Zebra TC57 but I think regardless of device model
  • Running in Simulator: No
  • Cordova version (cordova -v): 9.0.0
  • Cordova platform version (cordova platform ls): 8.1.0
  • Plugin configuration options: BackgroundGeolocation.configure({ desiredAccuracy: 10, stationaryRadius: 5, distanceFilter: 1, maxLocations: 1000, // Android only section locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER, interval: POLLING_INTERVAL, stopOnStillActivity: false, fastestInterval: FASTEST_INTERVAL, activitiesInterval: FASTEST_INTERVAL, notificationTitle: 'Background tracking', notificationText: 'enabled', notificationIconColor: '#FEDD1E', notificationIconLarge: 'mappointer_large', notificationIconSmall: 'mappointer_small' });

More information: I dig down the database files and it looks like logging_event_property table is not clean up property. logging_event table contains 7 days of events starting with event_id = 3152088 but logging_event_property still contains event_id = 1

heartmon avatar Jul 02 '20 07:07 heartmon

The same for me.... did you manage this meanwhile?

Is this plugin maintained?

jammin197 avatar Nov 02 '20 09:11 jammin197

For anyone else, constantly increasing storage could be fixed by changing this line in LoggerManager.java: root.setLevel(Level.TRACE); -> root.setLevel(Level.OFF);

Open in android studio and find java file: /android/capacitor-cordova-android-plugins/src/main/java/com/marianhello/logging/LoggerManager.java

I hope, this will help somebody :)

jammin197 avatar Nov 03 '20 16:11 jammin197