AbsLogger plugin can be called from the frontend javascript and native android/iOS code (currently only for Android).
// Calling from frontend js
AbsLogger.info({tag:"",message:""})
// Calling from native android
AbsLogger.info(tag:"",message:"")
Features/updates:
Logs page link added to side drawer (android only).
Logs page defaults to masking the server address and has an option to unmask.
Share button that shares a txt file with all logs.
Copy button that adds all logs to clipboard.
Clear logs button that deletes all logs from db.
On app launch, all logs older than 48 hours are deleted.
AbsLogger emits onLog events & logs page is real-time (e.g. watch progress syncing while listening).
Mostly only logs relating to progress syncing or app initialization have been added so far. There are a lot of old/useless logs in the app now so when switching them out with the new AbsLogger it is an opportunity to clean that up.
🔄 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/1546
**Author:** [@advplyr](https://github.com/advplyr)
**Created:** 4/20/2025
**Status:** ✅ Merged
**Merged:** 4/20/2025
**Merged by:** [@advplyr](https://github.com/advplyr)
**Base:** `master` ← **Head:** `abslogger`
---
### 📝 Commits (6)
- [`2000534`](https://github.com/advplyr/audiobookshelf-app/commit/2000534e372b6304eb9ed7e78ae8908f0036d7c6) Update logs to mask server address, add share txt file button
- [`74758c7`](https://github.com/advplyr/audiobookshelf-app/commit/74758c7762201e52e4139385525f80f6cb0b99ad) Add clear logs, use more menu dialog
- [`88e1877`](https://github.com/advplyr/audiobookshelf-app/commit/88e18777420dbd7a0cde18047a2f767a5bd296f6) More AbsLogs and clean logs older than 48 hours on init
- [`fe921fd`](https://github.com/advplyr/audiobookshelf-app/commit/fe921fd5b1d4616f4b4ea99d5a5f881d93f3175e) Update AbsLogger to have a tag with logs
- [`26b0fae`](https://github.com/advplyr/audiobookshelf-app/commit/26b0fae0fbb35ac900b8619dd5c6bba6fc4cd782) Setup onLog event, add app version & platform to logs and share filename
- [`882c274`](https://github.com/advplyr/audiobookshelf-app/commit/882c2749ab8f93ae4b78cae2efcfe47b74c132d1) Add AbsLogger stub to iOS, update iOS plugins for capacitor 7
### 📊 Changes
**25 files changed** (+425 additions, -207 deletions)
<details>
<summary>View changed files</summary>
📝 `android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt` (+2 -2)
📝 `android/app/src/main/java/com/audiobookshelf/app/managers/DbManager.kt` (+20 -1)
📝 `android/app/src/main/java/com/audiobookshelf/app/media/MediaProgressSyncer.kt` (+14 -12)
📝 `android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt` (+5 -4)
📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsAudioPlayer.kt` (+2 -1)
📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDatabase.kt` (+4 -4)
📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsLogger.kt` (+25 -6)
📝 `android/app/src/main/java/com/audiobookshelf/app/server/ApiHandler.kt` (+51 -10)
📝 `components/app/AudioPlayerContainer.vue` (+2 -1)
📝 `ios/App/App.xcodeproj/project.pbxproj` (+4 -16)
📝 `ios/App/App/MyViewController.swift` (+1 -0)
➖ `ios/App/App/plugins/AbsAudioPlayer.m` (+0 -35)
📝 `ios/App/App/plugins/AbsAudioPlayer.swift` (+23 -1)
➖ `ios/App/App/plugins/AbsDatabase.m` (+0 -29)
📝 `ios/App/App/plugins/AbsDatabase.swift` (+21 -1)
➖ `ios/App/App/plugins/AbsDownloader.m` (+0 -13)
📝 `ios/App/App/plugins/AbsDownloader.swift` (+6 -1)
➖ `ios/App/App/plugins/AbsFileSystem.m` (+0 -20)
📝 `ios/App/App/plugins/AbsFileSystem.swift` (+14 -1)
➕ `ios/App/App/plugins/AbsLogger.swift` (+47 -0)
_...and 5 more files_
</details>
### 📄 Description
AbsLogger plugin can be called from the frontend javascript and native android/iOS code (currently only for Android).
```js
// Calling from frontend js
AbsLogger.info({ tag: "", message: "" })
```
```kt
// Calling from native android
AbsLogger.info(tag: "", message: "")
```
Features/updates:
- Logs page link added to side drawer (android only).
- Logs page defaults to masking the server address and has an option to unmask.
- Share button that shares a txt file with all logs.
- Copy button that adds all logs to clipboard.
- Clear logs button that deletes all logs from db.
- On app launch, all logs older than 48 hours are deleted.
- AbsLogger emits `onLog` events & logs page is real-time (e.g. watch progress syncing while listening).
Mostly only logs relating to progress syncing or app initialization have been added so far. There are a lot of old/useless logs in the app now so when switching them out with the new AbsLogger it is an opportunity to clean that up.


---
<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/1546
Author: @advplyr
Created: 4/20/2025
Status: ✅ Merged
Merged: 4/20/2025
Merged by: @advplyr
Base:
master← Head:abslogger📝 Commits (6)
2000534Update logs to mask server address, add share txt file button74758c7Add clear logs, use more menu dialog88e1877More AbsLogs and clean logs older than 48 hours on initfe921fdUpdate AbsLogger to have a tag with logs26b0faeSetup onLog event, add app version & platform to logs and share filename882c274Add AbsLogger stub to iOS, update iOS plugins for capacitor 7📊 Changes
25 files changed (+425 additions, -207 deletions)
View changed files
📝
android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt(+2 -2)📝
android/app/src/main/java/com/audiobookshelf/app/managers/DbManager.kt(+20 -1)📝
android/app/src/main/java/com/audiobookshelf/app/media/MediaProgressSyncer.kt(+14 -12)📝
android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt(+5 -4)📝
android/app/src/main/java/com/audiobookshelf/app/plugins/AbsAudioPlayer.kt(+2 -1)📝
android/app/src/main/java/com/audiobookshelf/app/plugins/AbsDatabase.kt(+4 -4)📝
android/app/src/main/java/com/audiobookshelf/app/plugins/AbsLogger.kt(+25 -6)📝
android/app/src/main/java/com/audiobookshelf/app/server/ApiHandler.kt(+51 -10)📝
components/app/AudioPlayerContainer.vue(+2 -1)📝
ios/App/App.xcodeproj/project.pbxproj(+4 -16)📝
ios/App/App/MyViewController.swift(+1 -0)➖
ios/App/App/plugins/AbsAudioPlayer.m(+0 -35)📝
ios/App/App/plugins/AbsAudioPlayer.swift(+23 -1)➖
ios/App/App/plugins/AbsDatabase.m(+0 -29)📝
ios/App/App/plugins/AbsDatabase.swift(+21 -1)➖
ios/App/App/plugins/AbsDownloader.m(+0 -13)📝
ios/App/App/plugins/AbsDownloader.swift(+6 -1)➖
ios/App/App/plugins/AbsFileSystem.m(+0 -20)📝
ios/App/App/plugins/AbsFileSystem.swift(+14 -1)➕
ios/App/App/plugins/AbsLogger.swift(+47 -0)...and 5 more files
📄 Description
AbsLogger plugin can be called from the frontend javascript and native android/iOS code (currently only for Android).
Features/updates:
onLogevents & logs page is real-time (e.g. watch progress syncing while listening).Mostly only logs relating to progress syncing or app initialization have been added so far. There are a lot of old/useless logs in the app now so when switching them out with the new AbsLogger it is an opportunity to clean that up.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.