mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
Moved default sync factory to seperate file to avoid cyclic includes
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "spdlog/sinks/base_sink.h"
|
||||
#include "spdlog/details/synchronous_factory.h"
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
@@ -65,13 +66,13 @@ using systemd_sink_st = systemd_sink<details::null_mutex>;
|
||||
} // namespace sinks
|
||||
|
||||
// Create and register a syslog logger
|
||||
template<typename Factory = default_factory>
|
||||
template<typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> systemd_logger_mt(const std::string &logger_name)
|
||||
{
|
||||
return Factory::template create<sinks::systemd_sink_mt>(logger_name);
|
||||
}
|
||||
|
||||
template<typename Factory = default_factory>
|
||||
template<typename Factory = spdlog::synchronous_factory>
|
||||
inline std::shared_ptr<logger> systemd_logger_st(const std::string &logger_name)
|
||||
{
|
||||
return Factory::template create<sinks::systemd_sink_st>(logger_name);
|
||||
|
Reference in New Issue
Block a user