Commit fafe88c3 authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Merge pull request #227 from godbyk/create-logger-single-sink

Create a logger with a single sink
parents 33a18518 e16cb511
......@@ -93,6 +93,11 @@ inline std::shared_ptr<spdlog::logger> spdlog::syslog_logger(const std::string&
}
#endif
// Create and register a logger a single sink
inline std::shared_ptr<spdlog::logger> spdlog::create(const std::string& logger_name, const spdlog::sink_ptr& sink)
{
return details::registry::instance().create(logger_name, sink);
}
//Create logger with multiple sinks
......
......@@ -91,6 +91,9 @@ std::shared_ptr<logger> syslog_logger(const std::string& logger_name, const std:
#endif
// Create and register a logger a single sink
std::shared_ptr<logger> create(const std::string& logger_name, const sink_ptr& sink);
// Create and register a logger with multiple sinks
std::shared_ptr<logger> create(const std::string& logger_name, sinks_init_list sinks);
template<class It>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment