mirror of
https://github.com/gabime/spdlog.git
synced 2026-04-10 11:34:29 +08:00
* using API call instead of macro for toggling automatic registration
* added unit test for disabling automatic registration
This commit is contained in:
@@ -52,10 +52,7 @@ 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.init_with_global_defaults(new_logger);
|
||||
#ifndef SPDLOG_DISABLE_GLOBAL_REGISTRATION
|
||||
registry_inst.register_logger(new_logger);
|
||||
#endif
|
||||
registry_inst.initialize_logger(new_logger);
|
||||
return new_logger;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user