Skip to content

Default logger

Gabi Melman edited this page Oct 15, 2025 · 2 revisions

For convenience, spdlog creates a default global logger (to stdout, colored and multithreaded).

It can be used easily by calling spdlog::info(..), spdlog::debug(..), etc directly.

Its instance can be replaced to any other logger (shared_ptr):

spdlog::set_default_logger(some_other_logger);
spdlog::info("Use the new default logger");
Clone this wiki locally