raven-transports-fluentd 0.1.2 → 0.1.3

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: 5f470aa454b5522184c734a77491442b921b8965
4
- data.tar.gz: ceb7642afa88fb4c2db9cf9b683c4d00b98795f9
3
+ metadata.gz: 1f065da31b5512db3bc0b7c706e8b6e4d61e9940
4
+ data.tar.gz: 8c1a2164727713394d986b60ab1365bfcbee0dca
5
5
  SHA512:
6
- metadata.gz: 60e8967ba6ec2e9334a53a8d68dd138e116253c49647643176770c62e2f5c07c6418853e5a23b44c001ccb8c25461e5d1ddaa575ba262879fd5e8b88a5517a7a
7
- data.tar.gz: 622d3fec2c796e5747d1e207ec55294c3f251cdee434dde64af3b0b3713e9436a1e1c12fd6c01abba94b086414a281d33ef38974d099500ffab80d6c28e70d4a
6
+ metadata.gz: a21057506dd20a7dc4cd4d36716763ce37ff8fabe1aaea7b7ceb99d866eb628f725fe1b87e5e7ea83ac4bc79260f49e7a5a8fdad638b6df514bb8186d798d797
7
+ data.tar.gz: 6fdd2a321e33b0fb36affa29af9da0b332bf849b8f8ab1b2381641ce6d963dc891d59f59b077387e6ca490d6261c07f6ad6fd5daf3014caab0692607bf10417a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.3 (2015-05-21)
2
+ - Fix send event method name (#1)
3
+ - For https://github.com/getsentry/raven-ruby/pull/326
4
+
1
5
  ## 0.1.2 (2014-12-08)
2
6
  - Fix fluentd plugin issue with sentry-raven >= 0.11.2
3
7
 
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 Naoto Takai
1
+ Copyright 2014 Cookpad Inc.
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
@@ -9,6 +9,7 @@ module Fluent
9
9
  config_param :timeout, :integer, default: 1
10
10
  config_param :open_timeout, :integer, default: 1
11
11
  config_param :raven_log_path, :string
12
+ config_param :raven_log_level, :string, default: 'info'
12
13
 
13
14
  def configure(conf)
14
15
  super
@@ -22,7 +23,7 @@ module Fluent
22
23
  @base_configuration.open_timeout = conf['open_timeout']
23
24
 
24
25
  Raven.configure do |config|
25
- config.logger = Logger.new(conf['raven_log_path'])
26
+ config.logger = Logger.new(conf['raven_log_path'], log_level(conf['raven_log_level']))
26
27
  end
27
28
  end
28
29
 
@@ -57,5 +58,17 @@ module Fluent
57
58
  transport.send(auth_header, data, options)
58
59
  end
59
60
 
61
+ LOG_LEVELS = {
62
+ 'debug' => Logger::DEBUG,
63
+ 'info' => Logger::INFO,
64
+ 'warn' => Logger::WARN,
65
+ 'error' => Logger::ERROR,
66
+ 'fatal' => Logger::FATAL,
67
+ 'unknown' => Logger::UNKNOWN,
68
+ }.freeze
69
+
70
+ def log_level(str)
71
+ LOG_LEVELS.fetch(str, 'info')
72
+ end
60
73
  end
61
74
  end
@@ -9,7 +9,7 @@ module Raven
9
9
  module Transports
10
10
  class Fluentd < Transport
11
11
 
12
- def send(auth_header, data, options = {})
12
+ def send_event(auth_header, data, options = {})
13
13
  conn.post('error', auth_header: auth_header, data: data, options: options, project_id: configuration.project_id)
14
14
  end
15
15
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "raven-transports-fluentd"
7
- spec.version = '0.1.2'
7
+ spec.version = '0.1.3'
8
8
  spec.authors = ["Naoto Takai", "Kohei Suzuki"]
9
9
  spec.email = ["takai@cookpad.com", "kohei-suzuki@cookpad.com"]
10
10
  spec.summary = %q{Send error logs to sentry via fluentd.}
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "rake"
22
22
 
23
23
  spec.add_dependency "fluent-logger"
24
- spec.add_dependency "sentry-raven", ">= 0.10.1"
24
+ spec.add_dependency "sentry-raven", ">= 0.13.2"
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raven-transports-fluentd
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
  - Naoto Takai
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-08 00:00:00.000000000 Z
12
+ date: 2015-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 0.10.1
62
+ version: 0.13.2
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 0.10.1
69
+ version: 0.13.2
70
70
  description: Send error logs to sentry via fluentd.
71
71
  email:
72
72
  - takai@cookpad.com
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.2.2
108
+ rubygems_version: 2.4.5
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Send error logs to sentry via fluentd.