mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 06:32:06 +08:00
revert Args& by referebce in create
This commit is contained in:
parent
ad8220c9c8
commit
992a4e6077
@ -108,7 +108,7 @@ inline std::shared_ptr<spdlog::logger> spdlog::create(const std::string& logger_
|
|||||||
|
|
||||||
|
|
||||||
template <typename Sink, typename... Args>
|
template <typename Sink, typename... Args>
|
||||||
inline std::shared_ptr<spdlog::logger> spdlog::create(const std::string& logger_name, Args&... args)
|
inline std::shared_ptr<spdlog::logger> spdlog::create(const std::string& logger_name, Args... args)
|
||||||
{
|
{
|
||||||
sink_ptr sink = std::make_shared<Sink>(args...);
|
sink_ptr sink = std::make_shared<Sink>(args...);
|
||||||
return details::registry::instance().create(logger_name, { sink });
|
return details::registry::instance().create(logger_name, { sink });
|
||||||
|
@ -112,7 +112,7 @@ std::shared_ptr<logger> create(const std::string& logger_name, const It& sinks_b
|
|||||||
// Create and register a logger with templated sink type
|
// Create and register a logger with templated sink type
|
||||||
// Example: spdlog::create<daily_file_sink_st>("mylog", "dailylog_filename", "txt");
|
// Example: spdlog::create<daily_file_sink_st>("mylog", "dailylog_filename", "txt");
|
||||||
template <typename Sink, typename... Args>
|
template <typename Sink, typename... Args>
|
||||||
std::shared_ptr<spdlog::logger> create(const std::string& logger_name, Args&...);
|
std::shared_ptr<spdlog::logger> create(const std::string& logger_name, Args...);
|
||||||
|
|
||||||
|
|
||||||
// Register the given logger with the given name
|
// Register the given logger with the given name
|
||||||
|
Loading…
Reference in New Issue
Block a user