From 7b8d507615b8075fc6c8793a0965a32a708288c4 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sat, 13 Feb 2016 15:50:51 +0100 Subject: [PATCH] Allow syslog logger on Mac OS X --- include/spdlog/details/spdlog_impl.h | 2 +- include/spdlog/sinks/syslog_sink.h | 2 +- include/spdlog/spdlog.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/spdlog_impl.h b/include/spdlog/details/spdlog_impl.h index 85a7dc10..c8cc2168 100644 --- a/include/spdlog/details/spdlog_impl.h +++ b/include/spdlog/details/spdlog_impl.h @@ -71,7 +71,7 @@ inline std::shared_ptr spdlog::stderr_logger_st(const std::strin return details::registry::instance().create(logger_name, spdlog::sinks::stderr_sink_st::instance()); } -#ifdef __linux__ +#if defined(__linux__) || defined(__APPLE__) // Create syslog logger inline std::shared_ptr spdlog::syslog_logger(const std::string& logger_name, const std::string& syslog_ident, int syslog_option) { diff --git a/include/spdlog/sinks/syslog_sink.h b/include/spdlog/sinks/syslog_sink.h index 4963692f..ed1e2c40 100644 --- a/include/spdlog/sinks/syslog_sink.h +++ b/include/spdlog/sinks/syslog_sink.h @@ -5,7 +5,7 @@ #pragma once -#ifdef __linux__ +#if defined(__linux__) || defined(__APPLE__) #include #include diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index cd5b6b0f..0748cd8f 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -78,7 +78,7 @@ std::shared_ptr stderr_logger_st(const std::string& logger_name); // // Create and register a syslog logger // -#ifdef __linux__ +#if defined(__linux__) || defined(__APPLE__) std::shared_ptr syslog_logger(const std::string& logger_name, const std::string& ident = "", int syslog_option = 0); #endif