OptionaldebugConfigure the plugin to emit sound effects and local-notifications during development.
Defaults to false. When set to true, the plugin will emit debugging sounds and notifications for life-cycle events of [[BackgroundGeolocation | BackgroundGeolocation]].
In you wish to hear debug sounds in the background, you must manually enable the background-mode:
[x] Audio and Airplay background mode in Background Capabilities of XCode.

| Event | iOS | Android |
|---|---|---|
LOCATION_RECORDED |
||
LOCATION_SAMPLE |
||
LOCATION_ERROR |
||
LOCATION_SERVICES_ON |
n/a | |
LOCATION_SERVICES_OFF |
n/a | |
STATIONARY_GEOFENCE_EXIT |
||
MOTIONCHANGE_FALSE |
||
MOTIONCHANGE_TRUE |
||
MOTION_TRIGGER_DELAY_START |
n/a | |
MOTION_TRIGGER_DELAY_CANCEL |
n/a | |
STOP_DETECTION_DELAY_INITIATED |
n/a | |
STOP_TIMER_ON |
||
STOP_TIMER_OFF |
||
HEARTBEAT |
||
GEOFENCE_ENTER |
||
GEOFENCE_EXIT |
||
GEOFENCE_DWELL_START |
n/a | |
GEOFENCE_DWELL_CANCEL |
n/a | |
GEOFENCE_DWELL |
GEOFENCE_ENTER after GEOFENCE_DWELL_START |
|
ERROR |
||
WARNING |
n/a | |
BACKGROUND_FETCH |
n/a |
OptionallogControls the volume of recorded events in the plugin's logging database.
BackgroundGeolocation contains powerful logging features. By default,
the plugin starts with LogLevel.Off,
storing logMaxDays days worth of logs in its
internal SQLite database (default: 3).
The following log levels are defined as constants on BackgroundGeolocation:
| Label | Value |
|---|---|
| LogLevel.Off | 0 |
| LogLevel.Error | 1 |
| LogLevel.Warning | 2 |
| LogLevel.Info | 3 |
| LogLevel.Debug | 4 |
| LogLevel.Verbose | 5 |
Example log data
09-19 11:12:18.716 ╔═════════════════════════════════════════════
09-19 11:12:18.716 ║ BackgroundGeolocation Service started
09-19 11:12:18.716 ╠═════════════════════════════════════════════
09-19 11:12:18.723 [c.t.l.BackgroundGeolocationService d]
09-19 11:12:18.723 ✅ Started in foreground
09-19 11:12:18.737 [c.t.l.ActivityRecognitionService a]
09-19 11:12:18.737 🎾 Start activity updates: 10000
09-19 11:12:18.761 [c.t.l.BackgroundGeolocationService k]
09-19 11:12:18.761 🔴 Stop heartbeat
09-19 11:12:18.768 [c.t.l.BackgroundGeolocationService a]
09-19 11:12:18.768 🎾 Start heartbeat (60)
09-19 11:12:18.778 [c.t.l.BackgroundGeolocationService a]
09-19 11:12:18.778 🔵 setPace: null → false
09-19 11:12:18.781 [c.t.l.adapter.TSConfig c] ℹ️ Persist config
09-19 11:12:18.794 [c.t.locationmanager.util.b a]
09-19 11:12:18.794 ℹ️ LocationAuthorization: Permission granted
09-19 11:12:18.842 [c.t.l.http.HttpService flush]
09-19 11:12:18.842 ╔═════════════════════════════════════════════
09-19 11:12:18.842 ║ HTTP Service
09-19 11:12:18.842 ╠═════════════════════════════════════════════
09-19 11:12:19.000 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%)
09-19 11:12:21.314 [c.t.l.l.SingleLocationRequest$2 onLocationResult]
09-19 11:12:21.314 ╔═════════════════════════════════════════════
09-19 11:12:21.314 ║ SingleLocationRequest: 1
09-19 11:12:21.314 ╠═════════════════════════════════════════════
09-19 11:12:21.314 ╟─ 📍 Location[fused 45.519239,-73.617058 hAcc=15]999923706055 vAcc=2 sAcc=??? bAcc=???
09-19 11:12:21.327 [c.t.l.l.TSLocationManager onSingleLocationResult]
09-19 11:12:21.327 🔵 Acquired motionchange position, isMoving: false
09-19 11:12:21.342 [c.t.l.l.TSLocationManager a] 15.243
09-19 11:12:21.405 [c.t.locationmanager.data.a.c persist]
09-19 11:12:21.405 ✅ INSERT: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
09-19 11:12:21.423 [c.t.l.http.HttpService flush]
09-19 11:12:21.423 ╔═════════════════════════════════════════════
09-19 11:12:21.423 ║ HTTP Service
09-19 11:12:21.423 ╠═════════════════════════════════════════════
09-19 11:12:21.446 [c.t.locationmanager.data.a.c first]
09-19 11:12:21.446 ✅ Locked 1 records
09-19 11:12:21.454 [c.t.l.http.HttpService a]
09-19 11:12:21.454 🔵 HTTP POST: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
09-19 11:12:22.083 [c.t.l.http.HttpService$a onResponse]
09-19 11:12:22.083 🔵 Response: 200
09-19 11:12:22.100 [c.t.locationmanager.data.a.c destroy]
09-19 11:12:22.100 ✅ DESTROY: bca5acc8-e358-4d8f-827f-b8c0d556b7bb
09-19 11:12:55.226 [c.t.l.BackgroundGeolocationService onActivityRecognitionResult] still (100%)
BackgroundGeolocation.ready({
logger: {
logLevel: LogLevel.Verbose
},
});
See also
⚠️ Warning
When submitting your app to production, configure logLevel appropriately
(for example, LogLevel.Error),
since logs can grow to several megabytes over logMaxDays.
OptionallogMaximum number of days to persist a log-entry in database.
Defaults to 3 days.
Logging & diagnostics configuration.
The LoggerConfig group controls diagnostic logging for the SDK. Use it to adjust how much information is written to the internal log, whether to enable developer-friendly debug aids (soundFX, notifications), and how long logs are retained on the device.
Configure via:
config.loggerOverview
Logging serves two major purposes:
Development & QA
High-verbosity logs and optional audible soundFX make debugging intuitive. You can hear when locations are recorded, when motion changes occur, and when geofences trigger — without watching the console.
Production diagnostics
Lower verbosity preserves essential operational traces without excessive storage use or privacy impact.
See also: Config.logger
Log Levels
Choose the level appropriate for your environment:
SoundFX and debug indicators require debug =
true.Debug Behavior
When
debug: true, the SDK plays short, distinct soundFX when key events occur:onMotionChangetransitionsIt may also show temporary developer notifications (Android) to visualize state transitions and background operation.
⚠️ Never enable
debugin production.Retention
Use logMaxDays to control how long logs remain on device. Old entries are purged automatically on a rolling basis.
Recommended:
Retrieving Logs
Logs include:
See also: logMaxDays, logLevel
Examples
1) Development profile (maximum visibility)
2) Production profile (quiet & conservative)
3) Disable all logging
Migration from legacy flat Config
Legacy:
New (compound):
Legacy keys are still supported (deprecated), but the compound form is recommended.
Recommendations
Verbose+debug: trueduring active development.InfoorWarningin production.Offunless required — logs are invaluable for field diagnostics.