[
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 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?
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 for example 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)