[PR #4089] [MERGED] Simplify log level determination #4163

Closed
opened 2026-04-25 00:18:37 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4089
Author: @nichwall
Created: 3/8/2025
Status: Merged
Merged: 3/9/2025
Merged by: @advplyr

Base: masterHead: logger_cleanup


📝 Commits (1)

  • 10acf28 Simplify log level determination

📊 Changes

3 files changed (+6 additions, -31 deletions)

View changed files

📝 server/Logger.js (+1 -6)
📝 server/scanner/LibraryScan.js (+1 -11)
📝 server/scanner/ScanLogger.js (+4 -14)

📄 Description

Brief summary

Remove duplicate functions for logging.

Which issue is fixed?

No issue

In-depth Description

This PR removes the duplicate getLogLevelString function from the scan-related loggers. Logger is already included, so this just removes code duplication.

This also increases the total coverage of the Logger.test.js with no changes to the test code.

How have you tested this?

Ran unit tests and a scan to ensure nothing broke.

Screenshots

N/A


🔄 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/pull/4089 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 3/8/2025 **Status:** ✅ Merged **Merged:** 3/9/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `logger_cleanup` --- ### 📝 Commits (1) - [`10acf28`](https://github.com/advplyr/audiobookshelf/commit/10acf28fa6cafc0331b1ffeb3d1aebd4a1bf88a8) Simplify log level determination ### 📊 Changes **3 files changed** (+6 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `server/Logger.js` (+1 -6) 📝 `server/scanner/LibraryScan.js` (+1 -11) 📝 `server/scanner/ScanLogger.js` (+4 -14) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary Remove duplicate functions for logging. ## Which issue is fixed? No issue ## In-depth Description This PR removes the duplicate `getLogLevelString` function from the scan-related loggers. `Logger` is already included, so this just removes code duplication. This also increases the total coverage of the `Logger.test.js` with no changes to the test code. ## How have you tested this? Ran unit tests and a scan to ensure nothing broke. ## Screenshots N/A --- <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-25 00:18:37 +02:00
adam closed this issue 2026-04-25 00:18:37 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4163