logstash-logger 0.10.2 → 0.10.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 +17 -28
- data/README.md +30 -0
- data/lib/logstash-logger/device.rb +2 -1
- data/lib/logstash-logger/version.rb +1 -1
- data/spec/device_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7252b0c419a23b78262ae3cb1233d3cdab342b4d
|
4
|
+
data.tar.gz: e50db430b6b01ca9ef364a91667bc200f302bdd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6444602d1b40ee1a64c4af04fbcdbbb67fac1094c8921a521b0bcbc5af2ca65b16438ac32207f785dbe50bc2c324c55dcc0059759c0f93163cf681aa419db3cd
|
7
|
+
data.tar.gz: 5a3a64a0566313c5cf593e56455009d1a45bb4575097375947937113f8d9af87fe5f1bb79e4aa8ec9fb7bc37e856437f48b64c3a20f2c8c2cb180db8e473814f
|
data/CHANGELOG.md
CHANGED
@@ -1,44 +1,33 @@
|
|
1
|
+
## 0.10.3
|
2
|
+
- Merge URI and non-URI configuration. [#54](https://github.com/dwbutler/logstash-logger/pull/54)
|
3
|
+
|
1
4
|
## 0.10.2
|
2
|
-
- Fix for Custom Events can't access tags from Tagged Logging
|
3
|
-
Fixes [#48](https://github.com/dwbutler/logstash-logger/issues/48).
|
4
|
-
Thanks [Anil Rhemtulla](https://github.com/AnilRh)!
|
5
|
+
- Fix for Custom Events can't access tags from Tagged Logging. [#48](https://github.com/dwbutler/logstash-logger/issues/48)
|
5
6
|
|
6
7
|
## 0.10.1
|
7
|
-
- Fix for Redis URI parsing issue.
|
8
|
-
Fixes [#41](https://github.com/dwbutler/logstash-logger/issues/41).
|
9
|
-
Thanks [Vadim Kazakov](https://github.com/yads)!
|
8
|
+
- Fix for Redis URI parsing issue. [#41](https://github.com/dwbutler/logstash-logger/issues/41)
|
10
9
|
|
11
10
|
## 0.10.0
|
12
|
-
- Support for logging to Kafka.
|
13
|
-
Fixes [#37](https://github.com/dwbutler/logstash-logger/issues/37).
|
14
|
-
Thanks [Felix Bechstein](https://github.com/felixb)!
|
11
|
+
- Support for logging to Kafka. [#37](https://github.com/dwbutler/logstash-logger/issues/37)
|
15
12
|
|
16
13
|
## 0.9.0
|
17
|
-
- Support for customizing the fields on all logged messages via configuration.
|
18
|
-
Fixes [#32](https://github.com/dwbutler/logstash-logger/pull/32).
|
19
|
-
Thanks [Chris Blatchley](https://github.com/chrisblatchley)!
|
14
|
+
- Support for customizing the fields on all logged messages via configuration. [#32](https://github.com/dwbutler/logstash-logger/pull/32)
|
20
15
|
|
21
16
|
## 0.8.0
|
22
|
-
- Support for logging to stderr.
|
23
|
-
|
24
|
-
- Support multiple log outputs. Fixes [#28](https://github.com/dwbutler/logstash-logger/pull/28).
|
25
|
-
Thanks [Kurt Preston](https://github.com/KurtPreston)!
|
17
|
+
- Support for logging to stderr. [#24](https://github.com/dwbutler/logstash-logger/pull/25)
|
18
|
+
- Support multiple log outputs. [#28](https://github.com/dwbutler/logstash-logger/pull/28)
|
26
19
|
|
27
20
|
## 0.7.0
|
28
21
|
- Support for logging to a generic IO object.
|
29
|
-
- Support for overriding IO in stdout logger.
|
30
|
-
|
31
|
-
- Support
|
32
|
-
Thanks [Arron Mabrey](https://github.com/arronmabrey)!
|
33
|
-
- Support logging any object. See [#23](https://github.com/dwbutler/logstash-logger/issues/23).
|
22
|
+
- Support for overriding IO in stdout logger. [#20](https://github.com/dwbutler/logstash-logger/pull/20)
|
23
|
+
- Support for configuring logger with a URI. [#22](https://github.com/dwbutler/logstash-logger/pull/22)
|
24
|
+
- Support logging any object. [#23](https://github.com/dwbutler/logstash-logger/issues/23)
|
34
25
|
|
35
26
|
## 0.6.2
|
36
|
-
- Allow type to be specified as a string.
|
37
|
-
Thanks [Arron Mabrey](https://github.com/arronmabrey)!
|
27
|
+
- Allow type to be specified as a string. [#19](https://github.com/dwbutler/logstash-logger/pull/19)
|
38
28
|
|
39
29
|
## 0.6.1
|
40
|
-
- Don't mutate options passed to LogStashLogger.
|
41
|
-
Thanks [Arron Mabrey](https://github.com/arronmabrey)!
|
30
|
+
- Don't mutate options passed to LogStashLogger. [#18](https://github.com/dwbutler/logstash-logger/pull/18)
|
42
31
|
|
43
32
|
## 0.6.0
|
44
33
|
- Support for logging to a file.
|
@@ -49,10 +38,10 @@ Thanks [Arron Mabrey](https://github.com/arronmabrey)!
|
|
49
38
|
|
50
39
|
## 0.5.0
|
51
40
|
- Support for tagged logging. The interface was extracted from `ActiveSupport::TaggedLogging`
|
52
|
-
and outputs to the `tags` key.
|
41
|
+
and outputs to the `tags` key.
|
53
42
|
- The `(host, port, type)` constructor has been deprecated in favor of an options hash constructor.
|
54
|
-
- Support for using SSL for TCP connections.
|
55
|
-
- Support for configuring logger to write to STDOUT.
|
43
|
+
- Support for using SSL for TCP connections.
|
44
|
+
- Support for configuring logger to write to STDOUT.
|
56
45
|
- Support for Rails configuration.
|
57
46
|
- Fixed output to STDOUT in Rails console (Rails 4+).
|
58
47
|
- `host` is no longer required for TCP/UDP. It will default to `0.0.0.0`, the same default port that logstash listens on.
|
data/README.md
CHANGED
@@ -183,6 +183,7 @@ This configuration would result in the following output.
|
|
183
183
|
}
|
184
184
|
```
|
185
185
|
|
186
|
+
|
186
187
|
## Rails Integration
|
187
188
|
|
188
189
|
Verified to work with both Rails 3 and 4.
|
@@ -337,6 +338,35 @@ config.logstash = [
|
|
337
338
|
]
|
338
339
|
```
|
339
340
|
|
341
|
+
### Logging HTTP request data
|
342
|
+
|
343
|
+
In web applications, you can log data from HTTP requests (such as headers) using the
|
344
|
+
[RequestStore](https://github.com/steveklabnik/request_store) middleware. The following
|
345
|
+
example assumes Rails.
|
346
|
+
|
347
|
+
```ruby
|
348
|
+
# in Gemfile
|
349
|
+
gem 'request_store'
|
350
|
+
```
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
# in application.rb
|
354
|
+
LogStashLogger.configure do |config|
|
355
|
+
config.customize_event do |event|
|
356
|
+
event["session_id"] = RequestStore.store[:load_balancer_session_id]
|
357
|
+
end
|
358
|
+
end
|
359
|
+
```
|
360
|
+
|
361
|
+
```ruby
|
362
|
+
# in app/controllers/application_controller.rb
|
363
|
+
before_filter :track_load_balancer_session_id
|
364
|
+
|
365
|
+
def track_load_balancer_session_id
|
366
|
+
RequestStore.store[:load_balancer_session_id] = request.headers["X-LOADBALANCER-SESSIONID"]
|
367
|
+
end
|
368
|
+
```
|
369
|
+
|
340
370
|
## Ruby Compatibility
|
341
371
|
|
342
372
|
Verified to work with:
|
data/spec/device_spec.rb
CHANGED
@@ -70,6 +70,12 @@ describe LogStashLogger::Device do
|
|
70
70
|
context "when URI config is redis" do
|
71
71
|
let(:uri_config) { redis_uri_config }
|
72
72
|
it { is_expected.to be_a LogStashLogger::Device::Redis }
|
73
|
+
context "list specified" do
|
74
|
+
let(:uri_config) { redis_uri_config.merge({list: 'mylist'}) }
|
75
|
+
it 'is expected to have the list option set' do
|
76
|
+
expect(new_device.list).to eq('mylist')
|
77
|
+
end
|
78
|
+
end
|
73
79
|
end
|
74
80
|
|
75
81
|
context "when URI config is kafka" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Butler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-event
|