fluent-plugin-yohoushi 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
  SHA1:
3
- metadata.gz: b5ca313fd0763679536353b8ea54dd0cacc01c1f
4
- data.tar.gz: 7399aa2381f7ce696d6f76f8e60358b00167ed2b
3
+ metadata.gz: 434ea006cc218fc90ffc87e46ce4bf72972ad097
4
+ data.tar.gz: 62509e8cf32adb96e74e3ba3bc8d01fabd5d30b3
5
5
  SHA512:
6
- metadata.gz: 8359f7a3e43446fb0b917db7d5e59629b8b3acd2cec937d5bf13a4becd81e418d3dec5de2c5eea4282131887ce7639df3e3d6a615684476c59d62a10a63b6bb3
7
- data.tar.gz: a07612a0d7927c3eeabb532f0271c5531e240067d830b80f7b5f4c8f36798b49a0ae777443341aab70a45a3b427407c8f6624322b1679f1128fe4a9082ba2bd9
6
+ metadata.gz: 66107ffa872e24abfeee664ac50d8d9cabc8230cf3ce834a9fd7b299b577e0c579847b98b0298a1eab2e8cad39213608256663a98be8451e35666ebc8356d2b2
7
+ data.tar.gz: bab595411d0a16e534cfc3ac84a7ccb98b6f37b8a7371b7f9a2a3a5192293ecb8b18a3531b35654d9620b381f5d145b5bee5cbb3ef6db23463a87b36516e0a8d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.1.3 (2014/02/04)
2
+
3
+ Enhancement:
4
+
5
+ * Support `log_level` option of Fleuntd v0.10.43
6
+
1
7
  ## 0.1.2 (2014/02/03)
2
8
 
3
9
  Fixes:
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-yohoushi"
6
- s.version = "0.1.2"
6
+ s.version = "0.1.3"
7
7
  s.authors = ["Naotoshi Seo"]
8
8
  s.email = ["sonots@gmail.com"]
9
9
  s.homepage = "https://github.com/sonots/fluent-plugin-yohoushi"
@@ -2,6 +2,11 @@ module Fluent
2
2
  class YohoushiOutput < Output
3
3
  Plugin.register_output('yohoushi', self)
4
4
 
5
+ # To support log_level option implemented by Fluentd v0.10.43
6
+ unless method_defined?(:log)
7
+ define_method("log") { $log }
8
+ end
9
+
5
10
  MAPPING_MAX_NUM = 20
6
11
  KEY_MAX_NUM = 20
7
12
 
@@ -53,11 +58,6 @@ module Fluent
53
58
  @mapping[from] = to
54
59
  end
55
60
  @client = MultiForecast::Client.new('mapping' => @mapping) unless @mapping.empty?
56
- @client.clients.each { |c|
57
- c.connect_timeout = 5.0
58
- c.send_timeout = 5.0
59
- c.receive_timeout = 5.0
60
- }
61
61
  end
62
62
  raise ConfigError, "Either of `base_uri` or `mapping1` must be specified" unless @client
63
63
 
@@ -107,7 +107,7 @@ module Fluent
107
107
  @client.post_graph(path, { 'number' => number.to_i, 'mode' => @mode.to_s })
108
108
  end
109
109
  rescue => e
110
- $log.warn "out_yohoushi: #{e.class} #{e.message} #{path} #{e.backtrace.first}"
110
+ log.warn "out_yohoushi: #{e.class} #{e.message} #{path} #{e.backtrace.first}"
111
111
  end
112
112
 
113
113
  def emit(tag, es, chain)
@@ -144,7 +144,7 @@ module Fluent
144
144
 
145
145
  chain.next
146
146
  rescue => e
147
- $log.warn "out_yohoushi: #{e.class} #{e.message} #{e.backtrace.first}"
147
+ log.warn "out_yohoushi: #{e.class} #{e.message} #{e.backtrace.first}"
148
148
  end
149
149
 
150
150
  def expand_placeholder(value, time, record, opts)
@@ -195,7 +195,7 @@ module Fluent
195
195
 
196
196
  def expand(str)
197
197
  str.gsub(/(\${[a-z_]+(\[-?[0-9]+\])?}|__[A-Z_]+__)/) {
198
- $log.warn "record_reformer: unknown placeholder `#{$1}` found" unless @placeholders.include?($1)
198
+ log.warn "record_reformer: unknown placeholder `#{$1}` found" unless @placeholders.include?($1)
199
199
  @placeholders[$1]
200
200
  }
201
201
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-yohoushi
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
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-03 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd