[PR #4069] Spdlog migration #3916

Open
opened 2026-02-27 22:05:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/4069
Author: @Niram7777
Created: 2/22/2026
Status: 🔄 Open

Base: mainHead: spdlog-setup


📝 Commits (6)

  • a05c8bb LOG add spdlog
  • befed80 Replace fmt with spdlog
  • 85e8856 Delay IME lib global object init in Init/sceImeClose because of log
  • 90344d4 Replace internal log logic
  • 550ca26 Revert utf8 string partially
  • 1a4b87e Replace log append CLI with file

📊 Changes

31 files changed (+383 additions, -1200 deletions)

View changed files

📝 .gitmodules (+5 -0)
📝 CMakeLists.txt (+2 -11)
📝 documents/Debugging/Debugging.md (+2 -0)
📝 externals/CMakeLists.txt (+4 -0)
externals/spdlog (+1 -0)
📝 src/common/assert.cpp (+5 -5)
📝 src/common/config.cpp (+20 -9)
📝 src/common/config.h (+2 -0)
src/common/logging/backend.cpp (+0 -396)
src/common/logging/backend.h (+0 -34)
src/common/logging/filter.cpp (+0 -248)
src/common/logging/filter.h (+0 -66)
src/common/logging/formatter.h (+0 -42)
📝 src/common/logging/log.h (+298 -45)
src/common/logging/log_entry.h (+0 -28)
src/common/logging/text_formatter.cpp (+0 -110)
src/common/logging/text_formatter.h (+0 -21)
src/common/logging/types.h (+0 -138)
📝 src/core/devtools/widget/text_editor.cpp (+1 -0)
📝 src/core/file_sys/fs.h (+1 -2)

...and 11 more files

📄 Description

TODO:

  • filter
  • duplicate
  • update doc
  • refactor to avoid get
  • someone should test Windows
  • fix truncated log on SDL exit button (already was there before)
  • async

Various info:

  • bitfields have to be promoted to underlying type with + (I havent found variadic template with bitfield overloading possible)
  • log level first letter is lowercase
  • control logging:
shadps4 "SPDLOG_LEVEL=off,Render.Vulkan=debug,Lib.AudioOut=info"
or
SPDLOG_LEVEL="off,logger1=debug,logger2=info" shadps4

🔄 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/shadps4-emu/shadPS4/pull/4069 **Author:** [@Niram7777](https://github.com/Niram7777) **Created:** 2/22/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `spdlog-setup` --- ### 📝 Commits (6) - [`a05c8bb`](https://github.com/shadps4-emu/shadPS4/commit/a05c8bb0791ce6dcfb8e5cc69cc2df708d53a353) LOG add spdlog - [`befed80`](https://github.com/shadps4-emu/shadPS4/commit/befed80e16e27b369c0b1bf9d092bb614aa41c1b) Replace fmt with spdlog - [`85e8856`](https://github.com/shadps4-emu/shadPS4/commit/85e88561be51ee46fa87d4d0dbab8c8a2e3559b7) Delay IME lib global object init in Init/sceImeClose because of log - [`90344d4`](https://github.com/shadps4-emu/shadPS4/commit/90344d45e8ed6d1a9db1a43613dc010f673476b4) Replace internal log logic - [`550ca26`](https://github.com/shadps4-emu/shadPS4/commit/550ca26d2571f90447d2a3e7827cddfe3a69f8e4) Revert utf8 string partially - [`1a4b87e`](https://github.com/shadps4-emu/shadPS4/commit/1a4b87e25228d8b6f5f12c9a637bcd6c01f8d2dc) Replace log append CLI with file ### 📊 Changes **31 files changed** (+383 additions, -1200 deletions) <details> <summary>View changed files</summary> 📝 `.gitmodules` (+5 -0) 📝 `CMakeLists.txt` (+2 -11) 📝 `documents/Debugging/Debugging.md` (+2 -0) 📝 `externals/CMakeLists.txt` (+4 -0) ➕ `externals/spdlog` (+1 -0) 📝 `src/common/assert.cpp` (+5 -5) 📝 `src/common/config.cpp` (+20 -9) 📝 `src/common/config.h` (+2 -0) ➖ `src/common/logging/backend.cpp` (+0 -396) ➖ `src/common/logging/backend.h` (+0 -34) ➖ `src/common/logging/filter.cpp` (+0 -248) ➖ `src/common/logging/filter.h` (+0 -66) ➖ `src/common/logging/formatter.h` (+0 -42) 📝 `src/common/logging/log.h` (+298 -45) ➖ `src/common/logging/log_entry.h` (+0 -28) ➖ `src/common/logging/text_formatter.cpp` (+0 -110) ➖ `src/common/logging/text_formatter.h` (+0 -21) ➖ `src/common/logging/types.h` (+0 -138) 📝 `src/core/devtools/widget/text_editor.cpp` (+1 -0) 📝 `src/core/file_sys/fs.h` (+1 -2) _...and 11 more files_ </details> ### 📄 Description TODO: - [ ] filter - [ ] duplicate - [ ] update doc - [ ] refactor to avoid get - [ ] someone should test Windows - [ ] fix truncated log on SDL exit button (already was there before) - [ ] async Various info: - bitfields have to be promoted to underlying type with + (I havent found variadic template with bitfield overloading possible) - log level first letter is lowercase - control logging: ``` shadps4 "SPDLOG_LEVEL=off,Render.Vulkan=debug,Lib.AudioOut=info" or SPDLOG_LEVEL="off,logger1=debug,logger2=info" shadps4 ``` - maybe we should use utf-8 on Windows? https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page <img width="1112" height="165" alt="Screenshot From 2026-02-22 18-12-06" src="https://github.com/user-attachments/assets/45ac25c3-e634-4feb-a4d6-f7008140de01" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3916
No description provided.