Replies: 1 comment
-
Something like this will do: function strip_ansi(tag, timestamp, record)
if type(record["log"]) == "string" then
-- strip ansi https://stackoverflow.com/a/49209650/368691
record["log"] = record["log"]:gsub('[\27\155][][()#;?%d]*[A-PRZcf-ntqry=><~]', '')
return 2, 0, record
end
return 0, 0, 0
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Any idea how a lua script which would remove ANSI color codes from logs would look like ?
Regards.
Beta Was this translation helpful? Give feedback.
All reactions