nais-log-parser 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d44a856d6d2a0d49b8b39484ef4e53d7c37c8f43
4
- data.tar.gz: bb021f40308368dd789c60a7108aa555559916b0
3
+ metadata.gz: '06194f187fb6f16f7903c122228d87ffbb09cbdf'
4
+ data.tar.gz: ded6701a2fdc2590abf6d340946e9835d17ffe55
5
5
  SHA512:
6
- metadata.gz: 60c4f5c58ac84303f02d9c3cc64e63cdc24307203ef644ea72b54dfd0c3c1110962c70a093bcb66fb5b25b5305cb320cbd8502bf7b8990ee108c524528c6f1ed
7
- data.tar.gz: c674c479b5ecb15a5dd5bb65b3e649593aa50f8120f67fa26eb1d7fef1caefdd816c643553cdbe651350a9d32a0d57bb5e39dd0b9f4f375329ee1bb7c3008ec8
6
+ metadata.gz: 69239d4e1c6da63ed69f96ebc0ca62924c0f53e7d886cdbd6e710cf5d4843b2af590767ab051272e1b7c1310442b7ca28f171f1f022e7f74c560f6b5fbe147fc
7
+ data.tar.gz: cf79883ac448f9bd5201f76a09e35e5f9a6850ffc0988e4df0a2bc8b5699508ed80751ce4a7d9978cad5f7809a41ca64dc2fbc32e27030cd57f2d8aa90fe23d9
@@ -1,7 +1,7 @@
1
1
  module Nais
2
2
  module Log
3
3
  module Parser
4
- VERSION = "0.8.0"
4
+ VERSION = "0.9.0"
5
5
  end
6
6
  end
7
7
  end
@@ -43,10 +43,12 @@ module Nais
43
43
 
44
44
  def Parser.remap_elasticsearch_fields(time, record)
45
45
  record["received_at"] = Time.new.iso8601(9)
46
- if !record.has_key?("@timestamp")
46
+ unless record.has_key?("@timestamp")
47
47
  record["@timestamp"] = record.delete("timestamp") || record.delete("time") || Time.at(time).iso8601(9)
48
48
  end
49
- record["message"] = record.delete("log") unless record.has_key?("message")
49
+ unless record.has_key?("message")
50
+ record["message"] = record.delete("log") || record.delete("msg")
51
+ end
50
52
  record
51
53
  end
52
54
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nais-log-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terje Sannum