From 86de264da9e0fc615053a9257fe04e4b53df747d Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 21 Aug 2016 01:16:04 +0300 Subject: [PATCH] Added support for syslog in FreeBSD --- include/spdlog/details/spdlog_impl.h | 2 +- include/spdlog/spdlog.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/details/spdlog_impl.h b/include/spdlog/details/spdlog_impl.h index f3e5bf2a..b6ba5ad0 100644 --- a/include/spdlog/details/spdlog_impl.h +++ b/include/spdlog/details/spdlog_impl.h @@ -96,7 +96,7 @@ inline std::shared_ptr spdlog::stderr_logger_st(const std::strin return create_console_logger(logger_name, sinks::stderr_sink_st::instance(), color); } -#if defined(__linux__) || defined(__APPLE__) +#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) // 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/spdlog.h b/include/spdlog/spdlog.h index 3370307c..8a0ba08f 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -98,7 +98,7 @@ std::shared_ptr stderr_logger_st(const std::string& logger_name, bool co // // Create and register a syslog logger // -#if defined(__linux__) || defined(__APPLE__) +#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) std::shared_ptr syslog_logger(const std::string& logger_name, const std::string& ident = "", int syslog_option = 0); #endif