logstash-output-logservice 0.8.0 → 0.9.0
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 +4 -4
- data/lib/logstash/outputs/logservice.rb +7 -1
- data/logstash-output-logservice.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e3dd64f4643c30d3894829f9b16ba64fac3c129aee80d9c7a26cc9d52db1f7c
|
4
|
+
data.tar.gz: a3189eefcebf3620b76d99507a209f4d7272989516f1bab78941f9f74e9d2d03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 666969ca00264a276c0ddc167f0e572e657474956b0e61e119463b0c3feccce0b938a0b060e18d72d2b9eb223de8e61deb19a3ce670397c7f251956220629538
|
7
|
+
data.tar.gz: 53d04839f415791222c0ca91f124e00ae0c459fa61536856766e9ee34a11c2ce558b4f229727f819b62d36a4b0708b3e4c927320efef7ecf9ebf62737f69cd1f
|
@@ -43,6 +43,7 @@ class LogStash::Outputs::LogService < LogStash::Outputs::Base
|
|
43
43
|
config :send_retry_interval, :validate=> :number, :required=> false, :default=> 200
|
44
44
|
|
45
45
|
config :to_json, :validate=> :boolean, :required=> false, :default=> true
|
46
|
+
config :time_key, :validate=> :string, :required=> false, :default=> "@timestamp"
|
46
47
|
|
47
48
|
Log = com.aliyun.openservices.log
|
48
49
|
LogException = com.aliyun.openservices.log.exception.LogException
|
@@ -116,7 +117,12 @@ class LogStash::Outputs::LogService < LogStash::Outputs::Base
|
|
116
117
|
end
|
117
118
|
@logitem = LogCommon.LogItem.new
|
118
119
|
#@timestamp like 2016-02-18T03:23:11.053Z
|
119
|
-
@
|
120
|
+
time_value = @event_map[@time_key]
|
121
|
+
if time_value.nil? || time_value.empty?
|
122
|
+
time_value = @event_map['@timestamp']
|
123
|
+
@logger.warn("The time_key is nil or empty, use @timestamp")
|
124
|
+
end
|
125
|
+
@logitem.SetTime(Time.parse(time_value.to_s).to_i)
|
120
126
|
@event_map.each do | key, value |
|
121
127
|
@key_str = key.to_s
|
122
128
|
if @to_json
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-logservice'
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.9.0"
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = "post data into logservice."
|
6
6
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-logservice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tangkai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|