elastic/logstash

Support Locale for date parsing in sprintf format

Open

#2,315 建立於 2015年1月5日

在 GitHub 查看
 (10 留言) (0 反應) (0 負責人)Ruby (3,496 fork)batch import
enhancementhelp wanted

倉庫指標

Star
 (14,197 star)
PR 合併指標
 (平均合併 4天 19小時) (30 天內合併 50 個 PR)

描述

When parsing a date with sprintf, we use by default the local Locale.

For example:

 mutate {
    replace => { "message" => "%{start}[%{+dd/MMM/YYYY:HH:mm:ss Z}]%{end}" }
  }

could produce something different when running on a french computer than on an english computer: 14/déc./2014:00:13:42 +0000 vs 14/Dec/2014:00:13:42 +0000.

It could be nice to specify for a date the Locale we want to use whatever is set on the computer.

%{+LOCALE@DATE_FORMAT} such as:

 mutate {
    replace => { "message" => "%{start}[%{+fr@dd/MMM/YYYY:HH:mm:ss Z}]%{end}" }
  }

貢獻者指南