mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-06 15:04:49 +08:00
Create a logger with a single sink.
This commit is contained in:
parent
33a185188c
commit
e16cb511e5
include/spdlog
@ -93,6 +93,11 @@ inline std::shared_ptr<spdlog::logger> spdlog::syslog_logger(const std::string&
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
//Create logger with multiple sinks
|
||||||
|
|
||||||
|
@ -91,6 +91,9 @@ std::shared_ptr<logger> syslog_logger(const std::string& logger_name, const std:
|
|||||||
#endif
|
#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
|
// Create and register a logger with multiple sinks
|
||||||
std::shared_ptr<logger> create(const std::string& logger_name, sinks_init_list sinks);
|
std::shared_ptr<logger> create(const std::string& logger_name, sinks_init_list sinks);
|
||||||
template<class It>
|
template<class It>
|
||||||
|
Loading…
Reference in New Issue
Block a user