This commit is contained in:
Gabi Melman 2020-04-13 21:09:27 +03:00 committed by GitHub
parent 854abdf5e6
commit b20ffa7369
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@
#include <spdlog/sinks/base_sink.h>
#include <spdlog/details/null_mutex.h>
#include <spdlog/details/synchronous_factory.h>
#include <array>
#include <string>
@ -92,14 +93,14 @@ using syslog_sink_st = syslog_sink<details::null_mutex>;
} // namespace sinks
// Create and register a syslog logger
template<typename Factory = default_factory>
template<typename Factory = synchronous_factory>
inline std::shared_ptr<logger> syslog_logger_mt(const std::string &logger_name, const std::string &syslog_ident = "", int syslog_option = 0,
int syslog_facility = LOG_USER, bool enable_formatting = false)
{
return Factory::template create<sinks::syslog_sink_mt>(logger_name, syslog_ident, syslog_option, syslog_facility, enable_formatting);
}
template<typename Factory = default_factory>
template<typename Factory = synchronous_factory>
inline std::shared_ptr<logger> syslog_logger_st(const std::string &logger_name, const std::string &syslog_ident = "", int syslog_option = 0,
int syslog_facility = LOG_USER, bool enable_formatting = false)
{