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 +4 -4
- data/lib/nais/log/parser/version.rb +1 -1
- data/lib/nais/log/parser.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06194f187fb6f16f7903c122228d87ffbb09cbdf'
|
4
|
+
data.tar.gz: ded6701a2fdc2590abf6d340946e9835d17ffe55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69239d4e1c6da63ed69f96ebc0ca62924c0f53e7d886cdbd6e710cf5d4843b2af590767ab051272e1b7c1310442b7ca28f171f1f022e7f74c560f6b5fbe147fc
|
7
|
+
data.tar.gz: cf79883ac448f9bd5201f76a09e35e5f9a6850ffc0988e4df0a2bc8b5699508ed80751ce4a7d9978cad5f7809a41ca64dc2fbc32e27030cd57f2d8aa90fe23d9
|
data/lib/nais/log/parser.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
|