Commit 52b6be0d authored by gabime's avatar gabime

Added logger ctor that accepts only name(empty logger)

parent abd6a678
......@@ -31,19 +31,30 @@ namespace spdlog {
class logger
{
public:
// Empty logger
logger(std::string name) :
name_(std::move(name)),
sinks_(){}
// Logger with range on sinks
template<typename It>
logger(std::string name, It begin, It end)
: name_(std::move(name))
, sinks_(begin, end)
{}
// Logger with single sink
logger(std::string name, sink_ptr single_sink)
: logger(std::move(name), {std::move(single_sink)})
{}
// Logger with sinks init list
logger(std::string name, sinks_init_list sinks)
: logger(std::move(name), sinks.begin(), sinks.end())
{}
virtual ~logger() = default;
logger(const logger &) = delete;
......
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