sidekiq-gelf 1.0.0 → 1.0.1

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: 0161085b4bfbd7f4835b5c1158abaed97562c28a
4
- data.tar.gz: 9764d0c63c041f58b5708ad7337e422ff2dac164
3
+ metadata.gz: 603059aed994fe1ac098acd56eaa59ad208037b9
4
+ data.tar.gz: ff3e1cf9d07cf9314c41472f874d4b3d2b418ce5
5
5
  SHA512:
6
- metadata.gz: 457ccf8317313e94edca9a7d8a0da5cfd268e50d7b474451dc58bfa19b889772ae5e9c27611ee6d7acd2b78e17b2a429363199f3b03210d713d3567d359743bf
7
- data.tar.gz: a150d03466d764bd25f7d9478ad0c83b322c95db65c8b7d50333bbb35638e98f9331d111d61a63548def235428fc543b9b72fdadbc973ff932aaa94870542b2d
6
+ metadata.gz: eeaaa82be196e01e34999fd92d21cfb698bc0420ee2eff2b319a42e3dc8537d14884c2b204b3af3b3c1695398495cff0bf312c2925ef427da1a0f0b3105d881c
7
+ data.tar.gz: 2f97f05b90f856b8057df0aa258a37c1b80d0fe73440b134e16cbc4b4041a4b2cdf9fe11b4fe84dffa355b1547aa1563db177977a146243ac32632fd78813049
data/README.md CHANGED
@@ -4,11 +4,15 @@ Enables Sidekiq logging to a GELF-supported server, such as Graylog2.
4
4
 
5
5
  ## Usage
6
6
 
7
+ This will inject the logger as middleware into the Sidekiq server. Add it inside of your `Sidekiq.configure_server` block.
8
+
7
9
  ``` ruby
8
- # Adds the GELF logger as middleware in Sidekiq in order
9
- # to include important logging information.
10
- # These arguments are passed through to gelf-rb.
11
- Sidekiq::Logging::GELF.hook!('127.0.0.1', 12201, 'LAN', facility: "my-application")
10
+ Sidekiq.configure_server do |config|
11
+ # Adds the GELF logger as middleware in Sidekiq in order
12
+ # to include important logging information.
13
+ # These arguments are passed through to gelf-rb.
14
+ Sidekiq::Logging::GELF.hook!('127.0.0.1', 12201, 'LAN', facility: "my-application")
15
+ end
12
16
  ```
13
17
 
14
18
  **Note:** by default, normal logging is left as-is. If you wish to log only to the GELF input, you can do:
@@ -19,4 +23,4 @@ Sidekiq.configure_server do |config|
19
23
  chain.remove Sidekiq::Middleware::Server::Logging
20
24
  end
21
25
  end
22
- ```
26
+ ```
@@ -17,7 +17,8 @@ module Sidekiq
17
17
  context: context,
18
18
  worker: worker.class.to_s,
19
19
  queue: queue,
20
- params: item['args']
20
+ params: item['args'],
21
+ latency: Sidekiq::Job.new(item).latency
21
22
  })
22
23
 
23
24
  start = Time.now
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "sidekiq-gelf"
5
- s.version = "1.0.0"
5
+ s.version = "1.0.1"
6
6
 
7
7
  s.author = "Ryan LeFevre"
8
8
  s.date = "2014-04-21"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-gelf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan LeFevre
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.2.1
91
+ rubygems_version: 2.2.2
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Format Sidekiq log messages for a GELF-supported logging server like Graylog2