swebb2066 commented on code in PR #682:
URL: https://github.com/apache/logging-log4cxx/pull/682#discussion_r3563264957


##########
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:
   `LOG4CXX_EXPORT std::vector<LogString> splitSyslogPackets(const LogString& 
msg, size_t maxMessageLength)`



-- 
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