lib/loggerstash.rb in loggerstash-1.0.1 vs lib/loggerstash.rb in loggerstash-1.1.0
- old
+ new
@@ -163,12 +163,15 @@
def default_loggerstash_formatter
->(s, t, p, m) do
caller = caller_locations.find { |loc| ! [__FILE__, logger_filename].include? loc.absolute_path }
{
- "@timestamp": t.utc.strftime("%FT%T.%NZ"),
- "@metadata": { event_type: "loggerstash" },
- message: m,
+ "@timestamp": t.utc.strftime("%FT%T.%NZ"),
+ "@metadata": { event_type: "loggerstash" },
+ ecs: {
+ version: "1.8"
+ },
+ message: m,
log: {
level: s.downcase,
logger: "Loggerstash",
origin: {
base_function: caller.base_label, # not in ECS