mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Added a global option in tweakme.h that disabled global registration of
loggers. fixes #712
This commit is contained in:
@@ -52,7 +52,10 @@ struct async_factory_impl
|
||||
|
||||
auto sink = std::make_shared<Sink>(std::forward<SinkArgs>(args)...);
|
||||
auto new_logger = std::make_shared<async_logger>(std::move(logger_name), std::move(sink), std::move(tp), OverflowPolicy);
|
||||
registry_inst.register_and_init(new_logger);
|
||||
registry_inst.init_with_global_defaults(new_logger);
|
||||
#ifndef SPDLOG_DISABLE_GLOBAL_REGISTRATION
|
||||
registry_inst.register_logger(new_logger);
|
||||
#endif
|
||||
return new_logger;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user