You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Daniel Bakai (JIRA)" <ji...@apache.org> on 2019/07/19 17:59:00 UTC

[jira] [Comment Edited] (MINIFICPP-984) LogAttribute should return to prior behavior or detect text and print it out

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

Daniel Bakai edited comment on MINIFICPP-984 at 7/19/19 5:58 PM:
-----------------------------------------------------------------

[~phrocker] I mentioned these options (property to change hex/text behaviour or auto-detection) as possible ways forward on this if required - and now it seems it is required.

Autodetection can be tricky - for example we can decide to only print ASCII, which is fine, but UTF-8 could be perfectly valid on most terminals, but detecting that a byte stream is valid UTF-8 sequence is much more tricky. Autodetection could have an another unintended side effect - some binary data could sometimes be coincidentally ASCII-only, making some FlowFile payloads from the same source sometimes printed as hex, sometimes as ascii. Therefore, I don't think autodetection is a good solution.

I favor adding a Property to choose between Text/Hex and making Text the default to preserve behaviour.

On the topic of longer lines: I agree that 200 would be a better choice for this, but wouldn't it change prior behaviour as well? Or is that a minor enough change to be acceptable?


was (Author: bakaid):
[~phrocker] I mentioned these options (property to change hex/text behaviour or auto-detection) as possible ways forward on this if required - and now it seems it is required.

Autodetection can be tricky - for example we can decide to only print ASCII, which is fine, but UTF-8 could be perfectly valid on most terminals, but detecting that a byte stream is valid UTF-8 sequence is much more tricky. Autodetection could have an another unintended side effect - some binary data could sometimes be coincidentally ASCII-only, making some FlowFile payloads from the same source sometimes printed as hex, sometimes as ascii. Therefore, I don't think autodetection is a good solution.

I favor adding a Property to choose between Text/Hex and making ASCII the default to preserve behaviour.

On the topic of longer lines: I agree that 200 would be a better choice for this, but wouldn't it change prior behaviour as well? Or is that a minor enough change to be acceptable?

> LogAttribute should return to prior behavior or detect text and print it out
> ----------------------------------------------------------------------------
>
>                 Key: MINIFICPP-984
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-984
>             Project: Apache NiFi MiNiFi C++
>          Issue Type: Bug
>            Reporter: Mr TheSegfault
>            Assignee: Daniel Bakai
>            Priority: Blocker
>
> Noticed by user: change in behavior on log attribute payload log.
> Prior behavior on text files printed text. In some cases this may have issues so  I think we took a step forward. We should provide prior behavior and an option to print as hex or return to prior behavior noticing bugs that caused us to go down this road. Further we should increase the line length to 200, which is the typical log level length seen in NiFi I believe. Understandably lines can grow large but 80 is too short.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)