[PR #371] [MERGED] Improve iOS Logging #1423

Closed
opened 2026-04-24 23:58:21 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/371
Author: @ronaldheft
Created: 9/7/2022
Status: Merged
Merged: 9/15/2022
Merged by: @advplyr

Base: masterHead: ios-logging


📝 Commits (8)

  • d9313a1 Use os logging framework, so logs can be retrieved later
  • 639d641 Fix usage of this
  • 368f349 Use logging framework for AudioPlayer
  • ba7d2be Fix incorrect method call
  • ecc5cf3 Rename app to provide better logging
  • cc4c978 Rename ABS to Audiobookshelf
  • f8836be fix: Debug logging level does not persist to disk
  • 7a68cc9 Convert remain NSLog statement to new logging framework

📊 Changes

14 files changed (+233 additions, -136 deletions)

View changed files

📝 ios/App/App.xcodeproj/project.pbxproj (+12 -8)
📝 ios/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme (+6 -6)
📝 ios/App/App/AppDelegate.swift (+9 -7)
📝 ios/App/App/plugins/AbsAudioPlayer.swift (+16 -13)
📝 ios/App/App/plugins/AbsDatabase.swift (+8 -6)
📝 ios/App/App/plugins/AbsDownloader.swift (+21 -19)
📝 ios/App/App/plugins/AbsFileSystem.swift (+13 -11)
📝 ios/App/Shared/player/AudioPlayer.swift (+31 -27)
📝 ios/App/Shared/player/AudioPlayerSleepTimer.swift (+3 -3)
📝 ios/App/Shared/player/PlayerProgress.swift (+17 -15)
📝 ios/App/Shared/util/ApiClient.swift (+17 -15)
📝 ios/App/Shared/util/Database.swift (+7 -5)
📝 ios/App/Shared/util/Extensions.swift (+1 -1)
ios/App/Shared/util/Logger.swift (+72 -0)

📄 Description

  • Switches all classes to use the newer OSLog framework provided by Apple
    • This allows logs to be captured via a sysdiagnosis even when not actively capturing logs on a development machine for easier issue diagnosis
  • Adds a helper Logger class to make interacting with the OSLog framework cleaner
  • Renames the build target from the generic App to Audiobookself to make finding log messages easier among console logs

🔄 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/371 **Author:** [@ronaldheft](https://github.com/ronaldheft) **Created:** 9/7/2022 **Status:** ✅ Merged **Merged:** 9/15/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `ios-logging` --- ### 📝 Commits (8) - [`d9313a1`](https://github.com/advplyr/audiobookshelf-app/commit/d9313a16547e04ed486d6080172414db00274706) Use os logging framework, so logs can be retrieved later - [`639d641`](https://github.com/advplyr/audiobookshelf-app/commit/639d641c0710b29050ad3b6470de646583efe5a0) Fix usage of this - [`368f349`](https://github.com/advplyr/audiobookshelf-app/commit/368f349c7838d97bd4a98d7e0320e2b760694752) Use logging framework for AudioPlayer - [`ba7d2be`](https://github.com/advplyr/audiobookshelf-app/commit/ba7d2be03ee39ed3f4ccecb800a3253f9b6e85f6) Fix incorrect method call - [`ecc5cf3`](https://github.com/advplyr/audiobookshelf-app/commit/ecc5cf3e1b979b4f78322d1f168740401f72c146) Rename app to provide better logging - [`cc4c978`](https://github.com/advplyr/audiobookshelf-app/commit/cc4c9787c0b259dc50aa55029c784bb7d570e844) Rename ABS to Audiobookshelf - [`f8836be`](https://github.com/advplyr/audiobookshelf-app/commit/f8836be147d16cdf993f07bd98a994b24d02af34) fix: Debug logging level does not persist to disk - [`7a68cc9`](https://github.com/advplyr/audiobookshelf-app/commit/7a68cc99af60972cd7f6e5b36c3be055bd155b2b) Convert remain NSLog statement to new logging framework ### 📊 Changes **14 files changed** (+233 additions, -136 deletions) <details> <summary>View changed files</summary> 📝 `ios/App/App.xcodeproj/project.pbxproj` (+12 -8) 📝 `ios/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme` (+6 -6) 📝 `ios/App/App/AppDelegate.swift` (+9 -7) 📝 `ios/App/App/plugins/AbsAudioPlayer.swift` (+16 -13) 📝 `ios/App/App/plugins/AbsDatabase.swift` (+8 -6) 📝 `ios/App/App/plugins/AbsDownloader.swift` (+21 -19) 📝 `ios/App/App/plugins/AbsFileSystem.swift` (+13 -11) 📝 `ios/App/Shared/player/AudioPlayer.swift` (+31 -27) 📝 `ios/App/Shared/player/AudioPlayerSleepTimer.swift` (+3 -3) 📝 `ios/App/Shared/player/PlayerProgress.swift` (+17 -15) 📝 `ios/App/Shared/util/ApiClient.swift` (+17 -15) 📝 `ios/App/Shared/util/Database.swift` (+7 -5) 📝 `ios/App/Shared/util/Extensions.swift` (+1 -1) ➕ `ios/App/Shared/util/Logger.swift` (+72 -0) </details> ### 📄 Description * Switches all classes to use the newer [OSLog framework provided by Apple](https://developer.apple.com/documentation/os/logging/generating_log_messages_from_your_code) * This allows logs to be captured via a sysdiagnosis even when not actively capturing logs on a development machine for easier issue diagnosis * Adds a helper Logger class to make interacting with the OSLog framework cleaner * Renames the build target from the generic `App` to `Audiobookself` to make finding log messages easier among console logs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-24 23:58:21 +02:00
adam closed this issue 2026-04-24 23:58:21 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1423