quiet_rails_logger 0.0.2 → 0.0.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/lib/quiet_rails_logger/version.rb +1 -1
- data/lib/quiet_rails_logger.rb +10 -6
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e9993e609d49bf2c6f07aecdcb102134c3a4173
|
4
|
+
data.tar.gz: f068ef5dc669a7d5e19d45699063f0b0ce0f9d56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5c358175a15c7998aa04f736b1217fb1e330cdb650c3cdec517646fad6f2e3225f2985626bdcc0f1737221bc132ec12c4f30927e2732ea063946b3828dba389
|
7
|
+
data.tar.gz: 9119df403b9e3a64e6248c5925d708ada5840d794bef5d3ec801996ec73d0bef38bb8fd5e3d6d0b3486771d8fc5d7efac5cacb64746f00183f99dc5bb4f9641d
|
data/lib/quiet_rails_logger.rb
CHANGED
@@ -13,14 +13,18 @@ module QuietRailsLogger
|
|
13
13
|
|
14
14
|
class Engine < ::Rails::Engine
|
15
15
|
initializer 'quiet_rails_logger.skip_info_messages' do |app|
|
16
|
-
|
17
|
-
ActiveSupport.
|
18
|
-
|
19
|
-
|
20
|
-
ActiveSupport::Notifications.unsubscribe(pattern)
|
21
|
-
end
|
16
|
+
unsubscribe = lambda do
|
17
|
+
ActiveSupport::Subscriber.subscribers.each do |subscriber|
|
18
|
+
subscriber.patterns.each do |pattern|
|
19
|
+
ActiveSupport::Notifications.unsubscribe(pattern)
|
22
20
|
end
|
23
21
|
end
|
22
|
+
end
|
23
|
+
|
24
|
+
if Rails.env.in?(QuietRailsLogger.configuration.environments) || ENV['GEM'] == 'true'
|
25
|
+
ActiveSupport.on_load(:after_initialize) { unsubscribe.call }
|
26
|
+
ActiveSupport.on_load(:active_job) { unsubscribe.call }
|
27
|
+
ActiveSupport.on_load(:active_record) { unsubscribe.call }
|
24
28
|
|
25
29
|
app.middleware.delete Rails::Rack::Logger
|
26
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quiet_rails_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- skrinits
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sqlite3
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Stop logging of need not messages to log with an INFO level in production
|
28
42
|
and staging enviroments
|
29
43
|
email:
|