You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/06/03 00:43:58 UTC

[GitHub] [logging-log4cxx] rm5248 commented on a diff in pull request #111: Logcxx 556

rm5248 commented on code in PR #111:
URL: https://github.com/apache/logging-log4cxx/pull/111#discussion_r888519002


##########
src/main/cpp/syslogappender.cpp:
##########
@@ -326,11 +327,17 @@ void SyslogAppender::append(const spi::LoggingEventPtr& event, Pool& p)
 
 		while ( start != msg.end() )
 		{
-			LogString::iterator end = start + maxMessageLength - 12;
+			LogString::iterator end;// = start + maxMessageLength - 12;
+
+//			if ( end > msg.end() )
+//			{
+//				end = msg.end();
+//			}
 
-			if ( end > msg.end() )
-			{
+			if( msg.size() > (maxMessageLength - MINIMUM_MESSAGE_SIZE) ) {

Review Comment:
   Actually, that brings up a different point: what I have doesn't work in the first place - what should be happening is that you should be splitting it up into N messages.  The issue indicates that windows does not like to have an iterator past the end of the string(which this code does).  So it really just needs to calculate the N chunks at the beginning and do the correct number of iterations to split up the string properly.



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org