mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 02:21:34 +08:00
Clean spdlog.cpp added assert
This commit is contained in:
parent
7c44647d99
commit
03e9aacf11
@ -2,6 +2,7 @@
|
||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||
|
||||
#include <memory>
|
||||
#include <cassert>
|
||||
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "spdlog/common.h"
|
||||
@ -30,7 +31,10 @@ void set_global_logger(std::shared_ptr<logger> global_logger) {
|
||||
context()->set_logger(std::move(global_logger));
|
||||
}
|
||||
|
||||
logger *global_logger_raw() noexcept { return context_ref()->global_logger_raw(); }
|
||||
logger *global_logger_raw() noexcept {
|
||||
assert(context_ref()->global_logger_raw() != nullptr);
|
||||
return context_ref()->global_logger_raw();
|
||||
}
|
||||
|
||||
void set_formatter(std::unique_ptr<formatter> formatter) {
|
||||
global_logger()->set_formatter(std::move(formatter));
|
||||
|
Loading…
Reference in New Issue
Block a user