I am trying to decode apache error logs using lua script. I was able to
extract the fileds i needed but having problem with time conversion.
my log timestamp is in the following format : [Sat Mar 14 23:42:45.990158
2015]
in my lua script, i am converting timestamp as follows:
local timestamp = l
Just remove the capture group and the timestamp variable will contain the
value you want.
local timestamp = l.P"[" * dt.build_strftime_grammar("%a %b %d %H:%M:%S.%s
%Y") / dt.time_to_ns * "]"
if timestamp then msg.Timestamp = timestamp end
Trink
On Sat, Mar 14, 2015 at 8:58 PM, Madhukar Thota
w
2 matches
Mail list logo