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 2020/04/03 12:00:56 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #747: MINIFICPP-1036 - libarchive extension improvements

szaszm commented on a change in pull request #747: MINIFICPP-1036 - libarchive extension improvements
URL: https://github.com/apache/nifi-minifi-cpp/pull/747#discussion_r401923330
 
 

 ##########
 File path: extensions/libarchive/CompressContent.h
 ##########
 @@ -341,6 +346,73 @@ class CompressContent: public core::Processor {
     }
   };
 
+  class GzipWriteCallback : public OutputStreamCallback {
+   public:
+    GzipWriteCallback(std::string compress_mode, int64_t compress_level, std::shared_ptr<core::FlowFile> flow, std::shared_ptr<core::ProcessSession> session)
+      : logger_(logging::LoggerFactory<CompressContent>::getLogger())
+      , compress_mode_(std::move(compress_mode))
+      , compress_level_(compress_level)
+      , flow_(std::move(flow))
+      , session_(std::move(session))
+    {
+    }
+
+    ~GzipWriteCallback() override = default;
+
+    std::shared_ptr<logging::Logger> logger_;
+    std::string compress_mode_;
+    int64_t compress_level_;
+    std::shared_ptr<core::FlowFile> flow_;
+    std::shared_ptr<core::ProcessSession> session_;
+    bool success_{false};
 
 Review comment:
   Loggers should also use an in-class/default member initializer as they are always initialized the same way (per class) and it reduces clutter in the ctor init list.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services