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