yell-adapters-gelf 0.12.0 → 0.13.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +8 -0
- data/README.md +39 -13
- data/lib/yell/adapters/gelf/version.rb +1 -3
- data/yell-adapters-gelf.gemspec +6 -9
- metadata +65 -100
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -28,39 +28,65 @@ gem "yell-adapters-gelf"
|
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
31
|
-
After you set-up Graylog2 accordingly,
|
32
|
-
any other.
|
31
|
+
After you set-up [Graylog2](http://www.graylog2.org) accordingly,
|
32
|
+
you may use the Gelf adapter just like any other.
|
33
33
|
|
34
34
|
```ruby
|
35
35
|
logger = Yell.new :gelf
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
# or alternatively with the block syntax
|
38
|
+
logger = Yell.new do |l|
|
39
|
+
l.adapter :gelf
|
40
|
+
end
|
41
|
+
|
42
|
+
logger.info 'Hello World!'
|
39
43
|
```
|
40
44
|
|
41
|
-
|
45
|
+
Now check your Graylog2 web server for the received message. By default,
|
46
|
+
the gelf adapter will send the following information to Graylog2:
|
47
|
+
|
48
|
+
`facility`: The GELF facility (default: 'yell')
|
49
|
+
`level`: The current log level
|
50
|
+
`timestamp`: The time when the log event occured
|
51
|
+
`host`: The current hostname
|
52
|
+
`file`: The name of the file where the log event occured
|
53
|
+
`line`: The line in the file where the log event occured
|
54
|
+
`_method`: The method where the log event occured
|
55
|
+
`_pid`: The PID of your current process
|
56
|
+
|
57
|
+
|
58
|
+
### Example: Running with a different GELF facility
|
42
59
|
|
43
60
|
```ruby
|
61
|
+
logger = Yell.new :gelf, :facility => 'my own facility'
|
62
|
+
|
63
|
+
# or with the block syntax
|
44
64
|
logger = Yell.new do |l|
|
45
|
-
l.adapter :gelf
|
65
|
+
l.adapter :gelf, :facility => 'my own facility'
|
46
66
|
end
|
47
|
-
|
48
|
-
logger.info 'Hello World!'
|
49
67
|
```
|
50
68
|
|
51
|
-
|
52
|
-
options to the adapter:
|
69
|
+
### Example: Running Graylog2 on a different host or port
|
53
70
|
|
54
71
|
```ruby
|
55
|
-
logger = Yell.new :gelf, :host => '
|
72
|
+
logger = Yell.new :gelf, :host => '127.0.0.1', :port => 1234
|
56
73
|
|
57
|
-
#
|
74
|
+
# or with the block syntax
|
58
75
|
logger = Yell.new do |l|
|
59
|
-
l.adapter :gelf, :host => '
|
76
|
+
l.adapter :gelf, :host => '127.0.0.1', :port => 1234
|
60
77
|
end
|
61
78
|
|
62
79
|
logger.info 'Hello World!'
|
63
80
|
```
|
64
81
|
|
82
|
+
### Example: Passing additional keys to the adapter
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
logger = Yell.new :gelf
|
86
|
+
|
87
|
+
logger.info "Hello World", "_thread_id" => Thread.current.object_id,
|
88
|
+
"_current_user_id" => current_user.id
|
89
|
+
```
|
90
|
+
|
65
91
|
Copyright © 2012 Rudolf Schmidt, released under the MIT license
|
66
92
|
|
data/yell-adapters-gelf.gemspec
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
$:.push File.expand_path("../lib", __FILE__)
|
4
|
-
require "yell/adapters/gelf/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
6
|
s.name = "yell-adapters-gelf"
|
8
|
-
s.version =
|
7
|
+
s.version = "0.13.4"
|
9
8
|
s.authors = ["Rudolf Schmidt"]
|
10
9
|
|
11
10
|
s.homepage = "http://rubygems.org/gems/yell"
|
@@ -14,15 +13,13 @@ Gem::Specification.new do |s|
|
|
14
13
|
|
15
14
|
s.rubyforge_project = "yell"
|
16
15
|
|
17
|
-
s.files = `git ls-files`.split(
|
18
|
-
s.
|
19
|
-
s.
|
16
|
+
s.files = `git ls-files`.split($\)
|
17
|
+
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
|
+
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_runtime_dependency "yell", ">= 0.
|
22
|
+
s.add_runtime_dependency "yell", ">= 0.13.4"
|
23
23
|
s.add_runtime_dependency "json"
|
24
|
-
|
25
|
-
s.add_development_dependency "rspec"
|
26
|
-
s.add_development_dependency "rr"
|
27
24
|
end
|
28
25
|
|
metadata
CHANGED
@@ -1,123 +1,88 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: yell-adapters-gelf
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.0
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.13.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- Rudolf Schmidt
|
7
|
+
authors:
|
8
|
+
- Rudolf Schmidt
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
version: '0'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: rspec
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: rr
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
12
|
+
|
13
|
+
date: 2012-09-14 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: yell
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.13.4
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: json
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id002
|
78
37
|
description: Graylog2 adapter for Yell
|
79
38
|
email:
|
80
39
|
executables: []
|
40
|
+
|
81
41
|
extensions: []
|
42
|
+
|
82
43
|
extra_rdoc_files: []
|
83
|
-
|
84
|
-
|
85
|
-
- .
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
91
|
-
- lib/yell
|
92
|
-
- lib/yell/adapters/gelf
|
93
|
-
-
|
94
|
-
- spec/
|
95
|
-
- yell
|
44
|
+
|
45
|
+
files:
|
46
|
+
- .gitignore
|
47
|
+
- .travis.yml
|
48
|
+
- Gemfile
|
49
|
+
- LICENSE.txt
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- lib/yell-adapters-gelf.rb
|
53
|
+
- lib/yell/adapters/gelf.rb
|
54
|
+
- lib/yell/adapters/gelf/version.rb
|
55
|
+
- spec/spec_helper.rb
|
56
|
+
- spec/yell/adapters/gelf_spec.rb
|
57
|
+
- yell-adapters-gelf.gemspec
|
96
58
|
homepage: http://rubygems.org/gems/yell
|
97
59
|
licenses: []
|
60
|
+
|
98
61
|
post_install_message:
|
99
62
|
rdoc_options: []
|
100
|
-
|
101
|
-
|
102
|
-
|
63
|
+
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
67
|
none: false
|
104
|
-
requirements:
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: "0"
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
73
|
none: false
|
110
|
-
requirements:
|
111
|
-
|
112
|
-
|
113
|
-
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: "0"
|
114
78
|
requirements: []
|
79
|
+
|
115
80
|
rubyforge_project: yell
|
116
|
-
rubygems_version: 1.8.
|
81
|
+
rubygems_version: 1.8.15
|
117
82
|
signing_key:
|
118
83
|
specification_version: 3
|
119
84
|
summary: Yell - Your Extensible Logging Library
|
120
|
-
test_files:
|
121
|
-
- spec/spec_helper.rb
|
122
|
-
- spec/yell/adapters/gelf_spec.rb
|
85
|
+
test_files:
|
86
|
+
- spec/spec_helper.rb
|
87
|
+
- spec/yell/adapters/gelf_spec.rb
|
123
88
|
has_rdoc:
|