jmestwa-coder commented on code in PR #682:
URL: https://github.com/apache/logging-log4cxx/pull/682#discussion_r3564403017


##########
src/main/cpp/syslogappender.cpp:
##########
@@ -26,15 +26,151 @@
 #if !defined(LOG4CXX)
        #define LOG4CXX 1
 #endif
-#include <apr_strings.h>
 #include <log4cxx/private/syslogappender_priv.h>
+#include <algorithm>
 
 #define LOG_UNDEF -1
 
 using namespace LOG4CXX_NS;
 using namespace LOG4CXX_NS::helpers;
 using namespace LOG4CXX_NS::net;
 
+namespace
+{
+       constexpr size_t SYSLOG_PACKET_SUFFIX_RESERVED_CHARS = 12;
+
+       void appendPacketSuffix(LogString& item, size_t current, size_t total)
+       {
+               item.append(LOG4CXX_STR("("));
+               StringHelper::toString(current, item);
+               item.append(LOG4CXX_STR("/"));
+               StringHelper::toString(total, item);
+               item.append(LOG4CXX_STR(")"));
+       }
+}
+
+namespace LOG4CXX_NS
+{
+namespace net
+{
+namespace detail
+{
+std::vector<LogString> splitSyslogPackets(const LogString& msg, size_t 
maxMessageLength)

Review Comment:
   done, added LOG4CXX_EXPORT to the declaration and definition. that was the 
cause of the link failures on the shared-library builds, and the test now links 
and passes locally. happy to move it to a public static 
SyslogAppender::asPackets() instead if you'd rather expose it on the class.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to