loggun 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/loggun/modifiers/sidekiq.rb +13 -0
- data/lib/loggun/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bdbf0283432b32fe9fe682ca29e432480e1bae6cc4ff31879b50a26120b10c9
|
4
|
+
data.tar.gz: bce5fe0878cba0d1e758289baa9b2227bfc81a1946443c2b7bfc8ee4580a3267
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8f76f5a5d5244f20d6b3cf5ed1f2c41ef87f93f50ac107626bc6f45cc2a3b44629d6b3d45af61bbd79e424f99ce99f1070937bb97c6e35906c8ea6d2609efd8
|
7
|
+
data.tar.gz: 923f02afe9583bbb919671fbeb6fb54e8553efd1a01a6102d2eed865158a21c30c1effdd9e46f836488541b622ac8ae7e5c6ca9bfaa89e43752de40f0827aef3
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,10 @@ module Loggun
|
|
8
8
|
def apply
|
9
9
|
return unless defined?(::Sidekiq) && ::Sidekiq::VERSION >= MIN_SIDEKIQ_V
|
10
10
|
|
11
|
+
::Sidekiq.client_middleware do |chain|
|
12
|
+
chain.add ClientMiddleware
|
13
|
+
end
|
14
|
+
|
11
15
|
::Sidekiq.configure_server do |config|
|
12
16
|
Loggun::Config.setup_formatter(config, LoggunFormatter.new)
|
13
17
|
end
|
@@ -20,6 +24,15 @@ module Loggun
|
|
20
24
|
require 'loggun/modifiers/sidekiq/sidekiq4'
|
21
25
|
end
|
22
26
|
end
|
27
|
+
|
28
|
+
class ClientMiddleware
|
29
|
+
def call(worker_class, _msg, queue, _redis_pool)
|
30
|
+
yield.tap do |options|
|
31
|
+
msg = "Job #{worker_class} JID-#{options['jid']} enqueued to `#{queue}`"
|
32
|
+
Loggun.info('app.sidekiq.enqueued', msg, worker_class: worker_class, jid: options['jid'], queue: queue)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
23
36
|
end
|
24
37
|
end
|
25
38
|
end
|
data/lib/loggun/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loggun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksandr Noskov
|
8
8
|
- Sergey Nesterov
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
12
|
date: 2020-09-22 00:00:00.000000000 Z
|
@@ -168,7 +168,7 @@ licenses:
|
|
168
168
|
metadata:
|
169
169
|
homepage_uri: https://github.com/funbox/loggun
|
170
170
|
source_code_uri: https://github.com/funbox/loggun
|
171
|
-
post_install_message:
|
171
|
+
post_install_message:
|
172
172
|
rdoc_options: []
|
173
173
|
require_paths:
|
174
174
|
- lib
|
@@ -183,8 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: '0'
|
185
185
|
requirements: []
|
186
|
-
rubygems_version: 3.
|
187
|
-
signing_key:
|
186
|
+
rubygems_version: 3.1.2
|
187
|
+
signing_key:
|
188
188
|
specification_version: 4
|
189
189
|
summary: Loggun
|
190
190
|
test_files: []
|