rm5248 commented on code in PR #682:
URL: https://github.com/apache/logging-log4cxx/pull/682#discussion_r3276849657
##########
src/main/cpp/syslogwriter.cpp:
##########
@@ -64,6 +64,16 @@ SyslogWriter::~SyslogWriter(){}
void SyslogWriter::write(const LogString& source)
{
+#if defined(UNIT_TEST)
Review Comment:
It would never get compiled with `UNIT_TEST` defined though, you would have
to compile the library with that macro defined.
Instead, it would make more sense to make a helper/utility function that can
take a string of arbitrary length and split it up into smaller strings of a
given max length. This function would then get called by the `SyslogAppender`
to split the log message up. This function can then be properly tested on its
own.
--
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]