From c27ce21b6e0fd561fbf1bb493f9e77b9a720b44c Mon Sep 17 00:00:00 2001 From: Sebastien Darveau Date: Wed, 27 Jan 2016 15:30:14 -0500 Subject: [PATCH] Update to work with boost 1.53 & log4cplus 1.2. --- include/gelf4cplus/Gelf4CPlusAppender.hpp | 1 + include/gelf4cplus/Gelf4CPlusAppenderFactory.hpp | 6 ++++-- include/gelf4cplus/UdpTransport.hpp | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/gelf4cplus/Gelf4CPlusAppender.hpp b/include/gelf4cplus/Gelf4CPlusAppender.hpp index 517fa28..7b36c8c 100644 --- a/include/gelf4cplus/Gelf4CPlusAppender.hpp +++ b/include/gelf4cplus/Gelf4CPlusAppender.hpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/include/gelf4cplus/Gelf4CPlusAppenderFactory.hpp b/include/gelf4cplus/Gelf4CPlusAppenderFactory.hpp index cb9ef00..7afa85f 100644 --- a/include/gelf4cplus/Gelf4CPlusAppenderFactory.hpp +++ b/include/gelf4cplus/Gelf4CPlusAppenderFactory.hpp @@ -70,10 +70,12 @@ class Gelf4CPlusAppenderFactory : public log4cplus::spi::AppenderFactory new gelf4cplus::appender::Gelf4CPlusAppender(new transport::UdpTransport(host, port), properties)); } - tstring getTypeName() + virtual log4cplus::tstring const & getTypeName() const { - return "log4cplus::Gelf4CPlusAppender"; + static tstring typeName = "log4cplus::Gelf4CPlusAppender"; + return typeName; } + }; } // namespace appender diff --git a/include/gelf4cplus/UdpTransport.hpp b/include/gelf4cplus/UdpTransport.hpp index e0a0dba..dc4f8a5 100644 --- a/include/gelf4cplus/UdpTransport.hpp +++ b/include/gelf4cplus/UdpTransport.hpp @@ -72,8 +72,8 @@ class UdpTransport : public ITransport // Build the id string using the IP, PID, and TID std::ostringstream ss; ss << boost::asio::ip::host_name() << - boost::interprocess::detail::get_current_process_id() << - boost::interprocess::detail::get_current_thread_id(); + boost::interprocess::ipcdetail::get_current_process_id() << + boost::interprocess::ipcdetail::get_current_thread_id(); m_threadId = ss.str(); // Set up the Boost Asio stuff