Hi Friends Need support,
Suppose I have logs which ahs below details
line 1 :: 2020-05-26T01:49:48.756979Z 1 [Note] t
line 2 :: 2020-05-26 01:49:48 [Bdf] INFO -- F
And my td-agent config file looks like this .
<filter dh**>
@type record_transformer
enable_ruby
<record>
logfilename test
messagetimestamp ${ require 'time'; Time.strptime(record.dig("time_stamp"), "%FT%T.%NZ").utc.iso8601(3) }
</record>
</filter>
Поскольку формат даты в строке 2 неверен, его ошибка выдает как RuntimeError error = "не удалось развернуть require 'time'; Time.strptime(record[\"time_stamp\"], '%FT%T.%NZ').utc.iso8601(3)
: error = недопустимый формат времени strptime -`% FT% T.% NZ '
Please let me know where I am going wrong :(