nais-log-parser 0.34.3 → 0.34.4

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: b6b1591f1f324f597f79420ffb9f22850f1a334f
4
- data.tar.gz: 9c1c9bd1ab475e5a715fc91acb0164f330071098
3
+ metadata.gz: 9f7b5660d473048737201fcb9e665379f7b4b7af
4
+ data.tar.gz: ae38164363d352633270389af7a8df34f40c5927
5
5
  SHA512:
6
- metadata.gz: 5e3092a3fe52ce3027d8e5c290fdb4a859f7916e996f682f3e867eb73a404658c89c84a8d52c7c594d2da9d63461e808fc71faa69ae22d02b710df06eb82ac22
7
- data.tar.gz: dd949c72c9c50c2b3937a5f029268cacf5d8facb63d83d51c8e049f18d8b3a34389c1474f7e3922d00d859abfb94d28ee42dd536d46e2c6163b5c4e433b58202
6
+ metadata.gz: 1115cb73dce5d6209ef558baebc6758c1a98eb7688cb109263ea32f105e09d06d83372e89f2f6ecf4b397940eff6b40690bc7379bef9395740cd18f9efd655dc
7
+ data.tar.gz: 7a95452c854030bd2903cf6a1348eef07707c35172656bbc8e12139be0a96312eadbbbee44a595224ca20c95cd75513de5ae29943432ffff0f4baebba68e8f4e
@@ -1,7 +1,7 @@
1
1
  module Nais
2
2
  module Log
3
3
  module Parser
4
- VERSION = "0.34.3"
4
+ VERSION = "0.34.4"
5
5
  end
6
6
  end
7
7
  end
@@ -146,10 +146,9 @@ module Nais
146
146
  record.delete('systemd_unit')
147
147
  record.delete('systemd_invocation_id')
148
148
  # keep record['message']
149
- if record.has_key?('source_realtime_timestamp')
150
- record['@timestamp'] = record.delete('source_realtime_timestamp')
151
- elsif record.has_key?('source_monotonic_timestamp')
152
- record['@timestamp'] = record.delete('source_monotonic_timestamp')
149
+ ts = record.delete('source_realtime_timestamp') || record.delete('source_monotonic_timestamp')
150
+ unless ts.nil?
151
+ record['@timestamp'] = Time.at(ts[0..9].to_i, ts[10..16].to_i).utc.iso8601(6)
153
152
  end
154
153
  record
155
154
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nais-log-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.3
4
+ version: 0.34.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terje Sannum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-22 00:00:00.000000000 Z
11
+ date: 2019-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logfmt