fluent-plugin-http-status 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-http-status"
7
- gem.version = "0.0.1"
7
+ gem.version = "0.0.2"
8
8
  gem.authors = ["hiro-su"]
9
9
  gem.email = ["h.sugipon@gmail.com"]
10
10
  gem.description = %q{Fluentd input plugin for to get the http status}
@@ -126,13 +126,19 @@ module Fluent
126
126
  end
127
127
  }
128
128
 
129
- hash[:response_time] = Time.now - start
130
-
129
+ response_time = Time.now - start
130
+ hash[:response_time] = response_time * 1000
131
131
  return hash
132
132
  rescue Timeout::Error => ex
133
- return "Timeout Error : #{ex}"
133
+ $log.error "Timeout Error : #{ex.message}"
134
+ hash[:code] = 408
135
+ hash[:message] = ex.message
136
+ return hash
134
137
  rescue => ex
135
- return ex.message
138
+ $log.error ex.message
139
+ hash[:code] = 000
140
+ hash[:message] = ex.message
141
+ return hash
136
142
  end
137
143
 
138
144
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-http-status
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-18 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd