From e277f9b05ccdae405bf113418da0a138233c2872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Bedir?= Date: Mon, 22 Aug 2016 16:39:46 +0300 Subject: [PATCH] Make syslog backend tweakable. --- include/spdlog/common.h | 2 ++ include/spdlog/tweakme.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 1accd1dd..79918a4c 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -37,6 +37,8 @@ #define DEPRECATED #endif +#include + #ifndef SPDLOG_ENABLE_SYSLOG #if defined (__linux__) || defined(__APPLE__) || defined(__FreeBSD__) #define SPDLOG_ENABLE_SYSLOG diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index 1738fb93..64bad92f 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -11,6 +11,14 @@ // /////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// By default, syslog sink is only enabled on tested operating systems. +// Uncomment to enable it unconditionally. +// +// #define SPDLOG_ENABLE_SYSLOG +/////////////////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////////////////// // Under Linux, the much faster CLOCK_REALTIME_COARSE clock can be used. // This clock is less accurate - can be off by dozens of millis - depending on the kernel HZ.