Adds a toggle in the Android settings to enable/disable logging. Logging is disabled by default to reduce unnecessary database writes and improve performance. When enabled, logs are persisted to the DB and emitted to listeners as before.
Pull Request Type
Affects: Android only
Changes: Backend (native Kotlin) and Frontend (settings UI)
In-depth Description
Previously, AbsLogger always saved every log entry to the database via DeviceManager.dbManager.saveLog() and emitted it to listeners. This happens on every sync cycle (every 15 seconds during playback), on every connection event, and throughout the app lifecycle -- generating a large volume of log data even when no one is looking at it.
This PR adds an enableLogging boolean to DeviceSettings, defaulting to false. When disabled, all AbsLogger.info(), AbsLogger.error(), and AbsLogger.log() calls return early without persisting or emitting anything. Users can enable logging in Settings when they need to capture logs for debugging or bug reports.
Changes
DeviceClasses.kt -- Added enableLogging: Boolean field to DeviceSettings data class, defaulting to false
AbsLogger.kt -- Added isEnabled property that reads from DeviceManager.deviceData.deviceSettings?.enableLogging. All companion object logging methods (log, info, error) now return early if logging is disabled.
settings.vue -- Added an Android-only toggle switch (v-if="!isiOS") with data binding, toggle method, and device settings sync
Open the app with a fresh install -- verify logging is disabled by default
Go to Settings -- verify the "Enable logging" toggle is visible and off
Play an audiobook -- verify no logs are written (check via the logs screen)
Enable the toggle -- verify logs start appearing
Disable the toggle again -- verify logging stops
Restart the app -- verify the setting persists
Screenshots
N/A -- minor UI addition (single toggle switch in existing settings page).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/1836
**Author:** [@ckbaker10](https://github.com/ckbaker10)
**Created:** 3/30/2026
**Status:** ❌ Closed
**Base:** `master` ← **Head:** `local-build`
---
### 📝 Commits (10+)
- [`f08e169`](https://github.com/advplyr/audiobookshelf-app/commit/f08e169b2818e84806c67d7a0d86ee9e9e4906cf) Download Service
- [`f980387`](https://github.com/advplyr/audiobookshelf-app/commit/f98038758b0ac94b0112e38f0184ed2726cd54f0) Automatic download restarts working
- [`5c6044e`](https://github.com/advplyr/audiobookshelf-app/commit/5c6044ecaa9aa99f2d7648e2137c054f8e0d47dc) Download Queue works
- [`5584bdb`](https://github.com/advplyr/audiobookshelf-app/commit/5584bdbcbda072184bdcf0223f9b668070d9be4c) Queue seems to work okay
- [`6f06d84`](https://github.com/advplyr/audiobookshelf-app/commit/6f06d8461301dded75d0fabc77fd5f7d070a07d3) Merge remote-tracking branch 'upstream/master' into fix-download-issue
- [`72c3948`](https://github.com/advplyr/audiobookshelf-app/commit/72c394834f5259f4dd66acad249b95319a30cd88) mTLS Cert Authentication enabled
- [`1de5c3d`](https://github.com/advplyr/audiobookshelf-app/commit/1de5c3dccc0c97328d854d3eef1304939306a34a) Download Queue working with cancel / retry
- [`5dbe6af`](https://github.com/advplyr/audiobookshelf-app/commit/5dbe6af96c7d70778d8d5c89eadc916c8fac7598) Only show cert button when needed
- [`3cc231c`](https://github.com/advplyr/audiobookshelf-app/commit/3cc231cc9f6cf952d4e1a8e2fce699f5d987057a) When restarting a download previously downloaded files will be respected
- [`9f1930c`](https://github.com/advplyr/audiobookshelf-app/commit/9f1930cdbbb60e4955a5f6de938fe46d173b90ef) Respects previously downloaded files, button in settings to delete partials
### 📊 Changes
**35 files changed** (+3156 additions, -523 deletions)
<details>
<summary>View changed files</summary>
➕ `AI-DOCS/mTLS-Planning.md` (+134 -0)
📝 `android/app/build.gradle` (+9 -0)
➖ `android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java` (+0 -26)
📝 `android/app/src/main/AndroidManifest.xml` (+8 -0)
📝 `android/app/src/main/assets/capacitor.config.json` (+1 -1)
📝 `android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt` (+102 -42)
📝 `android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt` (+137 -113)
📝 `android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt` (+47 -59)
📝 `android/app/src/main/java/com/audiobookshelf/app/managers/DownloadItemManager.kt` (+621 -46)
📝 `android/app/src/main/java/com/audiobookshelf/app/managers/InternalDownloadManager.kt` (+52 -37)
➕ `android/app/src/main/java/com/audiobookshelf/app/managers/MtlsManager.kt` (+326 -0)
📝 `android/app/src/main/java/com/audiobookshelf/app/media/MediaProgressSyncer.kt` (+54 -0)
📝 `android/app/src/main/java/com/audiobookshelf/app/models/DownloadItemPart.kt` (+134 -53)
📝 `android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt` (+60 -1)
➕ `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsCredentialManager.kt` (+106 -0)
📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDatabase.kt` (+103 -0)
📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDownloader.kt` (+516 -80)
📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsLogger.kt` (+44 -14)
📝 `android/app/src/main/java/com/audiobookshelf/app/server/ApiHandler.kt` (+11 -12)
➕ `android/app/src/main/java/com/audiobookshelf/app/services/DownloadService.kt` (+216 -0)
_...and 15 more files_
</details>
### 📄 Description
## Brief summary
Adds a toggle in the Android settings to enable/disable logging. Logging is disabled by default to reduce unnecessary database writes and improve performance. When enabled, logs are persisted to the DB and emitted to listeners as before.
## Pull Request Type
- Affects: Android only
- Changes: Backend (native Kotlin) and Frontend (settings UI)
## In-depth Description
Previously, `AbsLogger` always saved every log entry to the database via `DeviceManager.dbManager.saveLog()` and emitted it to listeners. This happens on every sync cycle (every 15 seconds during playback), on every connection event, and throughout the app lifecycle -- generating a large volume of log data even when no one is looking at it.
This PR adds an `enableLogging` boolean to `DeviceSettings`, defaulting to `false`. When disabled, all `AbsLogger.info()`, `AbsLogger.error()`, and `AbsLogger.log()` calls return early without persisting or emitting anything. Users can enable logging in Settings when they need to capture logs for debugging or bug reports.
### Changes
- **`DeviceClasses.kt`** -- Added `enableLogging: Boolean` field to `DeviceSettings` data class, defaulting to `false`
- **`AbsLogger.kt`** -- Added `isEnabled` property that reads from `DeviceManager.deviceData.deviceSettings?.enableLogging`. All companion object logging methods (`log`, `info`, `error`) now return early if logging is disabled.
- **`settings.vue`** -- Added an Android-only toggle switch (`v-if="!isiOS"`) with data binding, toggle method, and device settings sync
- **`en-us.json`** -- Added `"LabelEnableLogging": "Enable logging"` string
## How have you tested this?
1. Open the app with a fresh install -- verify logging is disabled by default
2. Go to Settings -- verify the "Enable logging" toggle is visible and off
3. Play an audiobook -- verify no logs are written (check via the logs screen)
4. Enable the toggle -- verify logs start appearing
5. Disable the toggle again -- verify logging stops
6. Restart the app -- verify the setting persists
## Screenshots
N/A -- minor UI addition (single toggle switch in existing settings page).
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1836
Author: @ckbaker10
Created: 3/30/2026
Status: ❌ Closed
Base:
master← Head:local-build📝 Commits (10+)
f08e169Download Servicef980387Automatic download restarts working5c6044eDownload Queue works5584bdbQueue seems to work okay6f06d84Merge remote-tracking branch 'upstream/master' into fix-download-issue72c3948mTLS Cert Authentication enabled1de5c3dDownload Queue working with cancel / retry5dbe6afOnly show cert button when needed3cc231cWhen restarting a download previously downloaded files will be respected9f1930cRespects previously downloaded files, button in settings to delete partials📊 Changes
35 files changed (+3156 additions, -523 deletions)
View changed files
➕
AI-DOCS/mTLS-Planning.md(+134 -0)📝
android/app/build.gradle(+9 -0)➖
android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java(+0 -26)📝
android/app/src/main/AndroidManifest.xml(+8 -0)📝
android/app/src/main/assets/capacitor.config.json(+1 -1)📝
android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt(+102 -42)📝
android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt(+137 -113)📝
android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt(+47 -59)📝
android/app/src/main/java/com/audiobookshelf/app/managers/DownloadItemManager.kt(+621 -46)📝
android/app/src/main/java/com/audiobookshelf/app/managers/InternalDownloadManager.kt(+52 -37)➕
android/app/src/main/java/com/audiobookshelf/app/managers/MtlsManager.kt(+326 -0)📝
android/app/src/main/java/com/audiobookshelf/app/media/MediaProgressSyncer.kt(+54 -0)📝
android/app/src/main/java/com/audiobookshelf/app/models/DownloadItemPart.kt(+134 -53)📝
android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt(+60 -1)➕
android/app/src/main/java/com/audiobookshelf/app/plugins/AbsCredentialManager.kt(+106 -0)📝
android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDatabase.kt(+103 -0)📝
android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDownloader.kt(+516 -80)📝
android/app/src/main/java/com/audiobookshelf/app/plugins/AbsLogger.kt(+44 -14)📝
android/app/src/main/java/com/audiobookshelf/app/server/ApiHandler.kt(+11 -12)➕
android/app/src/main/java/com/audiobookshelf/app/services/DownloadService.kt(+216 -0)...and 15 more files
📄 Description
Brief summary
Adds a toggle in the Android settings to enable/disable logging. Logging is disabled by default to reduce unnecessary database writes and improve performance. When enabled, logs are persisted to the DB and emitted to listeners as before.
Pull Request Type
In-depth Description
Previously,
AbsLoggeralways saved every log entry to the database viaDeviceManager.dbManager.saveLog()and emitted it to listeners. This happens on every sync cycle (every 15 seconds during playback), on every connection event, and throughout the app lifecycle -- generating a large volume of log data even when no one is looking at it.This PR adds an
enableLoggingboolean toDeviceSettings, defaulting tofalse. When disabled, allAbsLogger.info(),AbsLogger.error(), andAbsLogger.log()calls return early without persisting or emitting anything. Users can enable logging in Settings when they need to capture logs for debugging or bug reports.Changes
DeviceClasses.kt-- AddedenableLogging: Booleanfield toDeviceSettingsdata class, defaulting tofalseAbsLogger.kt-- AddedisEnabledproperty that reads fromDeviceManager.deviceData.deviceSettings?.enableLogging. All companion object logging methods (log,info,error) now return early if logging is disabled.settings.vue-- Added an Android-only toggle switch (v-if="!isiOS") with data binding, toggle method, and device settings syncen-us.json-- Added"LabelEnableLogging": "Enable logging"stringHow have you tested this?
Screenshots
N/A -- minor UI addition (single toggle switch in existing settings page).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.