Skip to content

Conversation

@yalov
Copy link
Contributor

@yalov yalov commented Jul 8, 2025

This pull request updates the README.md file and introduces a new example for managing multiple loggers with different formats and levels.

The example showcasing 2 loggers and spdlog::set_level(), which set level NOT only to default logger, but to ALL registered loggers

(I won’t say how many hours it took me to figure this out)

yalov added 2 commits July 8, 2025 15:28
add example showcasing 2 loggers and `spdlog::set_level()` 
which set level not only to default logger, but to all registed loggers
@yalov yalov changed the title Patch 1 Update README.md Jul 8, 2025
@gabime
Copy link
Owner

gabime commented Jul 8, 2025

Thanks. If the intention is to clarify set_level, this could be much shorter. The example is little big for the frontage. Please try to shorten it.
Another option is to add it to the wiki.

@yalov
Copy link
Contributor Author

yalov commented Jul 9, 2025

I made it a little bit sorter.

I've kept the two loggers in the example to demonstrate that set_level applies globally to all registered loggers.

@gabime
Copy link
Owner

gabime commented Jul 9, 2025

Still too long ,sorry. For example “replace_default_logger_example()” already explains about default loggers. no need to repeat this here. This pr should take very few lines to convey the set level stuff.

@yalov
Copy link
Contributor Author

yalov commented Jul 10, 2025

ok, I made it more short

@gabime gabime merged commit 4f2b3d5 into gabime:v1.x Jul 16, 2025
14 of 15 checks passed
junekimdev pushed a commit to junekimdev/spdlog that referenced this pull request Aug 13, 2025
* Update README.md

add example showcasing 2 loggers and `spdlog::set_level()`
which set level not only to default logger, but to all registed loggers

* Update README.md

* simplify

* simplify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants