sidekiq_parameters_logging 1.1.0 → 1.2.0

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: 46b268d15a18076eda823b0cf9bf928745a59429
4
- data.tar.gz: dd6a8649a14daf91967eda6fe65b5a1f4f6ff5dd
3
+ metadata.gz: f65e48a92b69f90ec6fc22397f855414d980abe0
4
+ data.tar.gz: b5eaeb7f6808e1c80cab6126c0bf7469117cbdd8
5
5
  SHA512:
6
- metadata.gz: 1facab0c06e536eb5db41dc28e0deb7669cec8f4ac9fd036e4875f3093f051ea4134c30e3198306661eca0d2db7133ce392e3bd6d685f615c230f153f60ffe04
7
- data.tar.gz: 363f07c874d7b01bfa8129dfe138e0aee40fdfe3755b09cfae23f695158a29fa5ef3e318d963daf034db5cd63d5b01bafbb5397e4d68933a2bfd1ed666bb9201
6
+ metadata.gz: 8260cf3f2571e994685358555ea878cb7d04704af57d9102dd71b281d79a4e41dc20e06ad23e6862946fa3c389e2b8568af31edd0a91a8e1a785c54de5ece5e4
7
+ data.tar.gz: db59c38c34e4c6c3fb8d7c29262f59a99302088e63a8f1a3e470dab4df04abf17ea39b01ea63fb7a09b333c71ff78939cf0524717fdc5f0aea5a9e579299fbb7
@@ -12,7 +12,7 @@ class Worker
12
12
  end
13
13
  ```
14
14
 
15
- When you run sidekiq, you see this:
15
+ When you run sidekiq, you will see this:
16
16
 
17
17
  ```
18
18
  # without Sidekiq::Parameters::Logging
@@ -36,24 +36,24 @@ gem 'sidekiq_parameters_logging'
36
36
 
37
37
  ## Log Filtering
38
38
 
39
- You can also filter the parameters that you want to get logged by the logger:
39
+ You can also filter the parameters that you want to get printed out to the log:
40
40
 
41
41
  ```ruby
42
42
  class Worker
43
43
  include Sidekiq::Worker
44
44
  include Sidekiq::Parameters::Logger
45
45
 
46
- logger_filter do |params|
47
- params[-1] # only print out the last parameter
46
+ logger_filter do |param1, param2|
47
+ params1 # only print out the last parameter
48
48
  end
49
49
 
50
- def perform(*params)
50
+ def perform(param1, param2)
51
51
  # do something
52
52
  end
53
53
  end
54
54
  ```
55
55
 
56
- `logger_filter` takes a block with an array of parameters that are being passed to your `perform` method. Logger will then print out whatever that is returned from this block with `.inspect`.
56
+ `logger_filter` takes a block with parameters that are being passed to your `perform` method. Logger will then print out whatever that is returned from this block with `.inspect`.
57
57
 
58
58
  ## Notes
59
59
 
@@ -69,4 +69,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
69
69
 
70
70
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
71
71
 
72
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -11,7 +11,7 @@ module Sidekiq
11
11
  worker_class = worker.class
12
12
  if worker_class.respond_to?(:filter_block) && worker_class.filter_block
13
13
  logger.info do
14
- "parameters: #{worker_class.filter_block.call(item['args'].clone).inspect}"
14
+ "parameters: #{worker_class.filter_block.call(*(item['args'].clone)).inspect}"
15
15
  end
16
16
  else
17
17
  logger.info { "parameters: #{item['args'].inspect}" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_parameters_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Teng Siong Ong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-08 00:00:00.000000000 Z
11
+ date: 2013-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq