elastic/logstash

Support Locale for date parsing in sprintf format

Open

#2.315 geöffnet am 5. Jan. 2015

Auf GitHub ansehen
 (10 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Ruby (3.496 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (14.197 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 19h) (50 gemergte PRs in 30 T)

Beschreibung

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}" }
  }

Contributor Guide