mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Accecpt iterators by value in logger ctor insted of ref
This commit is contained in:
parent
10000c383a
commit
102c31a04c
@ -46,7 +46,7 @@ class async_logger final : public std::enable_shared_from_this<async_logger>, pu
|
||||
|
||||
public:
|
||||
template<typename It>
|
||||
async_logger(std::string logger_name, const It &begin, const It &end, std::weak_ptr<details::thread_pool> tp,
|
||||
async_logger(std::string logger_name, It begin, It end, std::weak_ptr<details::thread_pool> tp,
|
||||
async_overflow_policy overflow_policy = async_overflow_policy::block);
|
||||
|
||||
async_logger(std::string logger_name, sinks_init_list sinks_list, std::weak_ptr<details::thread_pool> tp,
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
template<typename It>
|
||||
inline spdlog::async_logger::async_logger(
|
||||
std::string logger_name, const It &begin, const It &end, std::weak_ptr<details::thread_pool> tp, async_overflow_policy overflow_policy)
|
||||
std::string logger_name, It begin, It end, std::weak_ptr<details::thread_pool> tp, async_overflow_policy overflow_policy)
|
||||
: logger(std::move(logger_name), begin, end)
|
||||
, thread_pool_(tp)
|
||||
, overflow_policy_(overflow_policy)
|
||||
|
@ -13,7 +13,7 @@
|
||||
// create logger with given name, sinks and the default pattern formatter
|
||||
// all other ctors will call this one
|
||||
template<typename It>
|
||||
inline spdlog::logger::logger(std::string logger_name, const It &begin, const It &end)
|
||||
inline spdlog::logger::logger(std::string logger_name, It begin, It end)
|
||||
: name_(std::move(logger_name))
|
||||
, sinks_(begin, end)
|
||||
, level_(level::info)
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
logger(std::string name, sinks_init_list sinks);
|
||||
|
||||
template<typename It>
|
||||
logger(std::string name, const It &begin, const It &end);
|
||||
logger(std::string name, It begin, It end);
|
||||
|
||||
virtual ~logger();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user