From 27a67b627f8da979da0cb596e5f9c7f275ab43e7 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 6 Dec 2024 12:31:07 +0200 Subject: [PATCH] fix comment --- include/spdlog/spdlog.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index b3f12ecd..3b9197cf 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -57,7 +57,6 @@ SPDLOG_API void set_error_handler(void (*handler)(const std::string &msg)); // calls context::shutdown() to perform final cleanups SPDLOG_API void shutdown(); - // API for using global logger (stdout_color_mt), // e.g: spdlog::info("Message {}", 1); // @@ -70,12 +69,15 @@ SPDLOG_API void shutdown(); // // IMPORTANT: // Do not call set_global_logger() from one thread while calling spdlog::info() from another. - SPDLOG_API std::shared_ptr global_logger(); +// Set the global logger. (for example, to replace the global logger with a custom logger) +SPDLOG_API void set_global_logger(std::shared_ptr global_logger); + + +// Return the raw pointer of the global logger SPDLOG_API logger *global_logger_raw(); -SPDLOG_API void set_global_logger(std::shared_ptr global_logger); template void log(source_loc source, level lvl, format_string_t fmt, Args &&...args) {