logstash-plugins / logstash-codec-rubydebug

Apache License 2.0
1 stars 5 forks source link

Replace awesome_print #6

Open guyboertje opened 6 years ago

guyboertje commented 6 years ago

We know that the awesome_print project is slow to release new versions.

Given that the Logstash Event only supports a fixed number of datatypes, I propose that we use simple ERB style templating to build a string representation of an Event.

One change that immediately comes to mind is to sort flat map the output and use the nested field reference style of key naming. This will encourage users to become familiar with it. e.g.

{
  "[host]" => "Elastics-MacBook-Pro.local",
  "[shapename][0]" => "initializing...",
  "[shapename][1]" => "shape10",
  "[shapetype][0]" => "initializing...",
  "[shapetype][1]" => "Try/Catch",
  "[lmessage2][0]" => "<Message>Executing Process Performance Management- Past(Child)-STAGE (Continuation f_0_0)</Message>",
  "[lmessage2][1]" => "<Message>Executing Try/Catch Shape continuation as f_0_0 with 1 document(s).</Message>",
  "[loglevel][0]" => "INFO",
  "[loglevel][1]" => "INFO",
  "[time][0]" => "2018-07-10T04:12:26Z",
  "[time][1]" => "2018-07-10T04:12:26Z",
  "[path]" => "/elastic/tmp/testing/logs/logs_sample.xml",
  "[@version]" => "1",
  "[@timestamp]" => 2018-07-13T10:02:06.759Z
}
thoemu commented 4 years ago

We know that the awesome_print project is slow to release new versions.

Which is why it was recently forked to: amazing_print. Maybe the plugin logstash-codec-rubydebug could use that fork instead?