Use Lua filter unexpected symbol near '''
this is my lua filter content
function log_split(tag,timestamp,record)
log = record["log"]
new_log = log:gsub('\u001b%[%d+;%d+;%d+;%d+;%d+m','')
:gsub('\u001b%[%d+;%d+;%d+;%d+m','')
:gsub('\u001b%[%d+;%d+;%d+m','')
:gsub('\u001b%[%d+;%d+m','')
:gsub('\u001b%[%d+m','')
record["log"] = new_log
return 2,timestamp,record
end
when i try /opt/td-agent-bit/bin/td-agent-bit -c /etc/td-agent-bit/td-agent-bit-lua.conf
it return a error
[error] [luajit] error loading script: /etc/td-agent-bit/ansi_filter.lua:3: unexpected symbol near '''
before this time , i have tried run lua in my idea, it's success

this is my conf [INPUT] name tail path /root/output/test.log parser docker # Read interval (sec) Default: 1 [FILTER] Name lua Match * script /etc/td-agent-bit/ansi_filter.lua call log_split [OUTPUT] name file match * path /root/output Format plain
Hi, Have you resolved this issue yet? I searched and try a lots but still can figure this out, please share your solution. Thanks in advance, K.