[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676285#comment-16676285 ] ASF GitHub Bot commented on NIFI-5777: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/3122 > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > Fix For: 1.9.0 > > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676280#comment-16676280 ] ASF GitHub Bot commented on NIFI-5777: -- Github user ijokarumawak commented on the issue: https://github.com/apache/nifi/pull/3122 LGTM, +1. Merging. Thanks @kotarot ! > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676283#comment-16676283 ] ASF subversion and git services commented on NIFI-5777: --- Commit 0c9120a73fe99bc4ced50997ee9d65250fb7cf3a in nifi's branch refs/heads/master from [~kotarot] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=0c9120a ] NIFI-5777: Update the log-level property of LogMessage to support EL This closes #3122. Signed-off-by: Koji Kawamura > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676161#comment-16676161 ] ASF GitHub Bot commented on NIFI-5777: -- Github user kotarot commented on the issue: https://github.com/apache/nifi/pull/3122 @pvillard31 @ijokarumawak Updated the property to support EL. Would you please check it? > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16674960#comment-16674960 ] ASF GitHub Bot commented on NIFI-5777: -- Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi/pull/3122#discussion_r230709356 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestLogMessage.java --- @@ -57,7 +57,7 @@ MockComponentLog getMockComponentLog() { public void before() throws InitializationException { testableLogMessage = new TestableLogMessage(); runner = TestRunners.newTestRunner(testableLogMessage); - +runner.setValidateExpressionUsage(false); --- End diff -- Yeah sounds good to me to have EL support ;) > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16674757#comment-16674757 ] ASF GitHub Bot commented on NIFI-5777: -- Github user kotarot commented on a diff in the pull request: https://github.com/apache/nifi/pull/3122#discussion_r230650492 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestLogMessage.java --- @@ -57,7 +57,7 @@ MockComponentLog getMockComponentLog() { public void before() throws InitializationException { testableLogMessage = new TestableLogMessage(); runner = TestRunners.newTestRunner(testableLogMessage); - +runner.setValidateExpressionUsage(false); --- End diff -- @pvillard31 @ijokarumawak Thank you for your reviews. At first, the purpose of my PR was, to enable to pick up a Log Level from the pull-down list (as we can do it on the LogAttribute processor), so that I would like to make it easier for users (including NiFi beginners) to use this processor. As @ijokarumawak has suggested, should I fix it to be EL acceptable for flexible logging usages? > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16673770#comment-16673770 ] ASF GitHub Bot commented on NIFI-5777: -- Github user ijokarumawak commented on a diff in the pull request: https://github.com/apache/nifi/pull/3122#discussion_r230526767 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestLogMessage.java --- @@ -57,7 +57,7 @@ MockComponentLog getMockComponentLog() { public void before() throws InitializationException { testableLogMessage = new TestableLogMessage(); runner = TestRunners.newTestRunner(testableLogMessage); - +runner.setValidateExpressionUsage(false); --- End diff -- Sorry for the confusion. I was just looking at the source code. When I run the processor, I realized that the processor doesn't allow EL. The logLevel is shown as a free text input, and I can input EL, but validation failed because of the configured allowable values. I still think changing log level by EL would be nice: ![image](https://user-images.githubusercontent.com/1107620/47943878-b191ff80-df3b-11e8-9456-939900b53e0e.png) My suggestion is, changing: ``` .description("The Log Level to use when logging the message") .allowableValues(MessageLogLevel.values()) ``` to ``` .description("The Log Level to use when logging the message: " + Arrays.toString(MessageLogLevel.values())) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) ``` How do you guys think? > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672765#comment-16672765 ] ASF GitHub Bot commented on NIFI-5777: -- Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi/pull/3122#discussion_r230300635 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestLogMessage.java --- @@ -57,7 +57,7 @@ MockComponentLog getMockComponentLog() { public void before() throws InitializationException { testableLogMessage = new TestableLogMessage(); runner = TestRunners.newTestRunner(testableLogMessage); - +runner.setValidateExpressionUsage(false); --- End diff -- In that case I'm not sure to understand the intent of this PR. Initially I thought it was about removing ``.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)`` on ``LOG_LEVEL`` since the property only accepts a list of allowed values. If we do that, then we should remove the ``.evaluateAttributeExpressions(flowFile)``, no? On the other hand, if we do want to allow EL on this property, then the property and code should be changed to allow free text value that is validated against the list of allowed values only if EL is not used. And then if EL is used, there should be a default behavior in case the value, after EL evaluation, is not an allowed value. Am I missing something? > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672515#comment-16672515 ] ASF GitHub Bot commented on NIFI-5777: -- Github user ijokarumawak commented on a diff in the pull request: https://github.com/apache/nifi/pull/3122#discussion_r230257806 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestLogMessage.java --- @@ -57,7 +57,7 @@ MockComponentLog getMockComponentLog() { public void before() throws InitializationException { testableLogMessage = new TestableLogMessage(); runner = TestRunners.newTestRunner(testableLogMessage); - +runner.setValidateExpressionUsage(false); --- End diff -- Hmm, I think changing logLevel based on expression makes sense. For example, if you want to debug for a particular type of FlowFiles, you'd use EL to write WARN level log for specific attribute value and use TRACE/DEBUG for others to minimize the noise. I don't think specifying log level by text is a critical issue.. > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671530#comment-16671530 ] ASF GitHub Bot commented on NIFI-5777: -- Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi/pull/3122#discussion_r230022659 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestLogMessage.java --- @@ -57,7 +57,7 @@ MockComponentLog getMockComponentLog() { public void before() throws InitializationException { testableLogMessage = new TestableLogMessage(); runner = TestRunners.newTestRunner(testableLogMessage); - +runner.setValidateExpressionUsage(false); --- End diff -- I disagree with this change: disabling the expression usage validation should be avoided as much as possible and, if I recall correctly, is only necessary in very specific edge cases. Instead of disabling the validation, I'd fix the original issue by removing ``.evaluateAttributeExpressions(flowFile)`` on L129 in LogMessage since it does not make sense. Once it's fixed, I'm a +1 and can merge to master. Feel free to squash your commits. Thanks! > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671268#comment-16671268 ] Kotaro Terada commented on NIFI-5777: - [~ijokarumawak], thank you for your comment, but I missed your comment before sending a PR. For the first one, I see, I'm gonna fix to leave it as it is. For the second one, I understand the behavior. In the PR (which I just sent), I fixed the property of LogMessage ad hoc. > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671222#comment-16671222 ] ASF GitHub Bot commented on NIFI-5777: -- GitHub user kotarot opened a pull request: https://github.com/apache/nifi/pull/3122 NIFI-5777: Update the tag and the property of LogMessage Thank you for submitting a contribution to Apache NiFi. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [X] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [X] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [X] Has your PR been rebased against the latest commit within the target branch (typically master)? - [X] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [X] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kotarot/nifi NIFI-5777 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/3122.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3122 commit 0e7a61cc6b807879d09e5f3b97afccf6def39155 Author: Kotaro Terada Date: 2018-11-01T07:40:17Z NIFI-5777: Update the tag and the property of LogMessage > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-5777) Update the tag and the property of LogMessage
[ https://issues.apache.org/jira/browse/NIFI-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671219#comment-16671219 ] Koji Kawamura commented on NIFI-5777: - I don't disagree about removing 'attributes' tag, but we need to be careful when we remove something already released. We can't guarantee that no one use 'attribute' tag to search that processor. I'd leave it as it is, if the benefit of doing so is relatively small. As you guessed, if a property supports EL, it can not be a combo box, it needs to be a text input. I think there is an existing JIRA to improve that. > Update the tag and the property of LogMessage > - > > Key: NIFI-5777 > URL: https://issues.apache.org/jira/browse/NIFI-5777 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.8.0 >Reporter: Kotaro Terada >Assignee: Kotaro Terada >Priority: Major > > There are a few points to update in {{LogMessage}}: > * The processor tags are a little bit strange. The current tags are > "attributes" and "logging". A tag "attributes" is not suitable for this > processor. I suggest just "logging" is enough. > * The property "Log Level" should be selected using a drop-down list (as it > is done in {{LogAttribute}}). Currently, the field is just a text box, and > users need to type a log level manually. If we set "expression language > supported" on the property, does it force to make the property become a text > field in the Web UI? -- This message was sent by Atlassian JIRA (v7.6.3#76005)