mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-15 10:12:06 +08:00
use context ref
This commit is contained in:
parent
962c16f4cb
commit
58f8949c5e
@ -20,7 +20,7 @@ std::shared_ptr<details::context> context() {return s_context;}
|
|||||||
|
|
||||||
const std::shared_ptr<details::context> &context_ref() {return s_context;}
|
const std::shared_ptr<details::context> &context_ref() {return s_context;}
|
||||||
|
|
||||||
std::shared_ptr<logger> global_logger() { return context()->global_logger(); }
|
std::shared_ptr<logger> global_logger() { return context_ref()->global_logger(); }
|
||||||
|
|
||||||
void set_global_logger(std::shared_ptr<logger> global_logger) {
|
void set_global_logger(std::shared_ptr<logger> global_logger) {
|
||||||
context()->set_logger(std::move(global_logger));
|
context()->set_logger(std::move(global_logger));
|
||||||
|
Loading…
Reference in New Issue
Block a user