You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/02/19 01:30:39 UTC

[GitHub] phrocker commented on a change in pull request #484: MINIFICPP-735: Fix issues with delimiter, make changes to facilitate …

phrocker commented on a change in pull request #484: MINIFICPP-735: Fix issues with delimiter, make changes to facilitate …
URL: https://github.com/apache/nifi-minifi-cpp/pull/484#discussion_r257864394
 
 

 ##########
 File path: libminifi/src/processors/TailFile.cpp
 ##########
 @@ -287,14 +288,36 @@ void TailFile::onTrigger(core::ProcessContext *context, core::ProcessSession *se
     std::string baseName = _currentTailFileName.substr(0, found);
     std::string extension = _currentTailFileName.substr(found + 1);
 
-    if (!this->_delimiter.empty()) {
-      char delim = this->_delimiter.c_str()[0];
+    if (!delimiter_.empty()) {
+      char delim = delimiter_.c_str()[0];
+      if (delim == '\\') {
+        if (delimiter_.size() > 1) {
+          switch (delimiter_.c_str()[1]) {
+            case 'r':
+              delim = '\r';
+              break;
+            case 't':
+              delim = '\t';
+              break;
+            case 'n':
+              delim = '\n';
+              break;
+            case '\\':
+              delim = '\\';
+              break;
+            default:
+              // previous behavior
 
 Review comment:
   That is the purpose of the log that was added below this. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services