[ 
https://issues.apache.org/jira/browse/MINIFICPP-479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719107#comment-16719107
 ] 

ASF GitHub Bot commented on MINIFICPP-479:
------------------------------------------

Github user arpadboda commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/460#discussion_r241051202
  
    --- Diff: libminifi/src/processors/LogAttribute.cpp ---
    @@ -38,13 +38,23 @@ namespace apache {
     namespace nifi {
     namespace minifi {
     namespace processors {
    -core::Property LogAttribute::LogLevel("Log Level", "The Log Level to use 
when logging the Attributes", "info");
    -core::Property LogAttribute::AttributesToLog("Attributes to Log", "A 
comma-separated list of Attributes to Log. If not specified, all attributes 
will be logged.", "");
    -core::Property LogAttribute::AttributesToIgnore("Attributes to Ignore", "A 
comma-separated list of Attributes to ignore. If not specified, no attributes 
will be ignored.", "");
    -core::Property LogAttribute::LogPayload("Log Payload", "If true, the 
FlowFile's payload will be logged, in addition to its attributes;"
    -                                        "otherwise, just the Attributes 
will be logged.",
    -                                        "false");
    -core::Property LogAttribute::LogPrefix("Log prefix", "Log prefix appended 
to the log lines. It helps to distinguish the output of multiple LogAttribute 
processors.", "");
    +
    +core::Property LogAttribute::LogLevel(
    +    core::PropertyBuilder::createProperty("Log 
Level")->withDescription("The Log Level to use when logging the 
Attributes")->withAllowedValue<std::string>("info")->withAllowedValue("trace")
    +        
->withAllowedValue("error")->withAllowedValue("warn")->withAllowedValue("debug")->withDefaultValue("info")->build());
    --- End diff --
    
    I don't like this, withAllowedValue should be implemented as 
    ```
    template<typename T>
    withAllowedValue(std::set<T>) {
      ...
    }
    ```
    
    This way it can be done as:
    ```
    withAllowedValue({"Red", "Green", "Blue"))
    ```


> Incorporate property validation information into manifest
> ---------------------------------------------------------
>
>                 Key: MINIFICPP-479
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-479
>             Project: NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: Andrew Christianson
>            Assignee: Mr TheSegfault
>            Priority: Major
>
> High-level intent is to avoid round-trip to c2 to know that flow is valid 
> (or, invalid in common/trivial ways).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to