From a00229eaa50db00f7efd489a4af04cf2593449bb Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Sat, 7 Dec 2024 11:29:12 +0200 Subject: [PATCH] Fix syslog_sink and example --- example/example.cpp | 2 +- include/spdlog/sinks/syslog_sink.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/example/example.cpp b/example/example.cpp index a86a049a..fe85c4bf 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -233,7 +233,7 @@ void err_handler_example() { #include "spdlog/sinks/syslog_sink.h" void syslog_example() { std::string ident = "spdlog-example"; - auto syslog_logger = spdlog::create("syslog", ident, 0); + auto syslog_logger = spdlog::create("syslog", ident, LOG_PID); syslog_logger->warn("This is warning that will end up in syslog."); } #endif diff --git a/include/spdlog/sinks/syslog_sink.h b/include/spdlog/sinks/syslog_sink.h index e7812510..52a486e1 100644 --- a/include/spdlog/sinks/syslog_sink.h +++ b/include/spdlog/sinks/syslog_sink.h @@ -9,6 +9,7 @@ #include #include +#include namespace spdlog { namespace sinks {