diff --git a/include/spdlog/details/context.h b/include/spdlog/details/context.h index 5fdc82e1..896cc150 100644 --- a/include/spdlog/details/context.h +++ b/include/spdlog/details/context.h @@ -37,7 +37,7 @@ public: // This make the default API faster, but cannot be used concurrently with set_default_logger(). // e.g do not call set_default_logger() from one thread while calling spdlog::info() from // another. - logger *get_default_raw() const; + logger *get_default_raw() const noexcept; // set default logger. // default logger is stored in default_logger_ (for faster retrieval) and in the loggers_ map. diff --git a/src/details/context.cpp b/src/details/context.cpp index 4a627a68..f629a6b2 100644 --- a/src/details/context.cpp +++ b/src/details/context.cpp @@ -50,7 +50,7 @@ std::shared_ptr context::default_logger() { // To be used directly by the spdlog default api (e.g. spdlog::info) // This make the default API faster, but cannot be used concurrently with set_default_logger(). // e.g do not call set_default_logger() from one thread while calling spdlog::info() from another. -logger *context::get_default_raw() const { return default_logger_.get(); } +logger *context::get_default_raw() const noexcept{ return default_logger_.get(); } // set default logger. // default logger is stored in default_logger_ (for faster retrieval) and in the loggers_ map.