Replace the current logging system with `spdlog-rs`
Background
As I discussed with @eatradish in AOSC Telegram group, oma is considering replacing the current logging system with others. And at the recent AOSCC 2025 conference, I happened to talk about the performance optimization details of spdlog-rs. As the author of spdlog-rs, I'd like to push forward with getting oma to try out spdlog-rs.
@NotEvenANeko is interested in participating in this work, so the porting will be assigned to her. I and other oma collaborators will review the PR and help if needed.
Notes
The current logging system used in oma is tracing, and oma has customized some of its own logic that could probably be optimized away (I've found so far):
-
OmaLayeris used to output styled level text, in spdlog-rs, a formatter can define a styled range, thenStdStramSinkwill automatically output terminal-compatible styles for the range, and the styles can be customized as well. -
Deleting old log files can be done automatically by
RotatingFileSinkin spdlog-rs.
I'll start this work few days later, is there anything else I should know about? 👀
@NotEvenANeko It's exciting to see that you will start this work. Please use the sink-decouple branch of spdlog-rs as dependency in your draft PR, where there are some breaking changes in PR SpriteOvO/spdlog-rs#93 waiting for @Lancern's review and will most likely end up being merged and released. This is a good opportunity to verify it. However, we will release spdlog-rs v0.5.0 whenever possible before the PR of replacing logging crate is finally merged to oma.