Added register_logger to spdlog.h to register manually created loggers

This commit is contained in:
gabime
2015-04-11 16:36:31 +03:00
parent 8b4b5d27ce
commit 623f59ce6f
3 changed files with 23 additions and 6 deletions

View File

@@ -32,6 +32,11 @@
#include "../sinks/stdout_sinks.h"
#include "../sinks/syslog_sink.h"
inline void spdlog::register_logger(std::shared_ptr<logger> logger, const std::string& logger_name)
{
return details::registry::instance().register_logger(logger, logger_name);
}
inline std::shared_ptr<spdlog::logger> spdlog::get(const std::string& name)
{
return details::registry::instance().get(name);