-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
have: shouldWe should have this feature, but is not required. It is medium priority.We should have this feature, but is not required. It is medium priority.type: bugA code related bug.A code related bug.type: helpUser support and help.User support and help.
Description
Hi,
ansi_stripper transform doesn't remove ansi color from field?
For the following test:
[transforms.ansi_stripper_simple_yo]
inputs = []
type = "ansi_stripper"
field = "message"
[[tests]]
name = "ansi_stripper_simple_yo"
[tests.input]
insert_at = "ansi_stripper_simple_yo"
type = "raw"
value = "\t\r\\033[31mHelloWorld"
[[tests.outputs]]
extract_from = "ansi_stripper_simple_yo"
[[tests.outputs.conditions]]
"message.equals" = "HelloWorld"
It outputs:
check transform 'ansi_stripper_simple_yo' failed conditions:
condition[0]: predicates failed: [ message.equals: "HelloWorld" ]
payloads (events encoded as JSON):
input: {"message":"\t\r\\033[31mHelloWorld","timestamp":"2020-04-02T03:52:42.774856684Z"}
output: {"message":"\\033[31mHelloWorld","timestamp":"2020-04-02T03:52:42.774856684Z"}
Maybe it's a wanted behavior and we should write ansi_color_stripper? WDYT?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
have: shouldWe should have this feature, but is not required. It is medium priority.We should have this feature, but is not required. It is medium priority.type: bugA code related bug.A code related bug.type: helpUser support and help.User support and help.