fluent-plugin-kube-events-timestamp 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af49890ee89485b846d5eb108ab427be93ebd46d65529e037fd89f090a729686
4
- data.tar.gz: f3a0df69adce30eedd04f3ad807f3038d97b8e9e447702c0a49d1f66322b0184
3
+ metadata.gz: 7d07b51bbba681686b828a84d1d6409d5f73c7170234140e329aedf647a9fe6f
4
+ data.tar.gz: 3a6b32685e62999531a959f446e2a5501ceaa3c7a4ad4c13aa9cb12c6eb781aa
5
5
  SHA512:
6
- metadata.gz: 00e7f370299bf9bb2a7061d4618e5a1afaabf4e5e22b1259dcd148c3adfadaf81fb330fa55be390b4eb12061c9b683861a7e91341ca1e16896d03592c613350e
7
- data.tar.gz: e5039bd81d35e0af1105deaa380db1864c4feca93bb09ad8210f4ca1e38561eb7fbe7242ffcc9a49f7e916e8247c032ac340505949e62c962ba6c36e1abaed54
6
+ metadata.gz: 46e7f6a6b443c04e527c2fcf994c388faec19cacc9e84a0d9cfc3004f9471781a71854380443f0ce29acc872c9264105eaabdc7b345d0b432da6605547cfe782
7
+ data.tar.gz: 1d99e7ac2f50e4c5d939423aa28c483ea63a51c1cff7f11cefaefb5ae7d9c1a68ef8a1ca82d65ee417097a001e21cba056582e8e6cb05770c2d4a021dfbb139a
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "fluent-plugin-kube-events-timestamp"
3
- spec.version = "0.1.2"
3
+ spec.version = "0.1.3"
4
4
  spec.authors = ["Banzai Cloud"]
5
5
  spec.email = ["info@banzaicloud.com"]
6
6
  spec.description = %q{fluent filter plugin to map multiple timestamps into an additional one}
@@ -34,7 +34,11 @@ module Fluent::Plugin
34
34
 
35
35
  def filter(tag, time, record)
36
36
 
37
- record[@mapped_time_key] = (getin(record,@timestamp_fields[0]).to_s.empty?) ? (getin(record,@timestamp_fields[1]).to_s.empty?) ? getin(record,@timestamp_fields[2]) : getin(record,@timestamp_fields[1]) : getin(record,@timestamp_fields[0])
37
+ vals=@timestamp_fields.map do |field|; getin(record, field); end
38
+
39
+ record[@mapped_time_key] = (vals[0].to_s.empty?) ? (vals[1].to_s.empty?) ? vals[2] : vals[1] : vals[0]
40
+
41
+ # record[@mapped_time_key] = (getin(record,@timestamp_fields[0]).to_s.empty?) ? (getin(record,@timestamp_fields[1]).to_s.empty?) ? getin(record,@timestamp_fields[2]) : getin(record,@timestamp_fields[1]) : getin(record,@timestamp_fields[0])
38
42
 
39
43
  if record[@mapped_time_key].to_s.empty?
40
44
  record[@mapped_time_key] = Time.at(time.is_a?(Fluent::EventTime) ? time.to_int : time).strftime(@strftime_format)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kube-events-timestamp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Banzai Cloud