mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Add a syslog() based sink for Linux.
This commit introduce a new sink: syslog_sink. This sink is Linux only, and will write log entries to the system logger, using the syslog() library call. It is instanciable using spdlog::syslog_logger(name). Note that the suffix _st or _mt is not present, as syslog() is thread-safe. I also applied @gabime reviews and added license header.
This commit is contained in:
@@ -68,6 +68,11 @@ std::shared_ptr<logger> stderr_logger_mt(const std::string& logger_name);
|
||||
std::shared_ptr<logger> stderr_logger_st(const std::string& logger_name);
|
||||
|
||||
|
||||
// Create a syslog logger
|
||||
#ifdef __linux__
|
||||
std::shared_ptr<logger> syslog_logger(const std::string& logger_name);
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Create a logger with multiple sinks
|
||||
|
Reference in New Issue
Block a user