raven-transports-fluentd 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 +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/lib/fluent/plugin/out_raven.rb +14 -1
- data/lib/raven/transports/fluentd.rb +1 -1
- data/raven-transports-fluentd.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f065da31b5512db3bc0b7c706e8b6e4d61e9940
|
4
|
+
data.tar.gz: 8c1a2164727713394d986b60ab1365bfcbee0dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a21057506dd20a7dc4cd4d36716763ce37ff8fabe1aaea7b7ceb99d866eb628f725fe1b87e5e7ea83ac4bc79260f49e7a5a8fdad638b6df514bb8186d798d797
|
7
|
+
data.tar.gz: 6fdd2a321e33b0fb36affa29af9da0b332bf849b8f8ab1b2381641ce6d963dc891d59f59b077387e6ca490d6261c07f6ad6fd5daf3014caab0692607bf10417a
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
@@ -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
|
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.
|
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.
|
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|