log_sanity 0.2.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +81 -78
- data/README.md +2 -2
- data/lib/log_sanity/railtie.rb +9 -1
- data/lib/log_sanity/version.rb +1 -1
- data/log_sanity.gemspec +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cd638933608ceaeffa6e4ac4f9dff3650128a21e7afee0d31f003b6f381c6ff
|
4
|
+
data.tar.gz: c0753610f32d3828d8d667c06fd6c023c7ad08aed3b167d6851f99c579c446d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efbdfe624f62f7e5883cb4e7a10e0f32ad41dea981f8cad792c1b27c18cdd3452dbf8e2345601df786458a428f91fe2e5751979ffb2d318a0558f9352a98ddea
|
7
|
+
data.tar.gz: 74bf53856c0eabfd35f3d0b90893bba70b7a671579253f2b2dc4440ae4a7017de97cd8410b01a869d7091f975641464b52ab0d7021952eaf09a4b84d05836b2b
|
data/Gemfile.lock
CHANGED
@@ -1,135 +1,138 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
log_sanity (0.
|
5
|
-
rails (>= 5, < 6.
|
4
|
+
log_sanity (1.0.0)
|
5
|
+
rails (>= 5.2, < 6.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (6.0
|
11
|
-
actionpack (= 6.0
|
10
|
+
actioncable (6.1.0)
|
11
|
+
actionpack (= 6.1.0)
|
12
|
+
activesupport (= 6.1.0)
|
12
13
|
nio4r (~> 2.0)
|
13
14
|
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailbox (6.0
|
15
|
-
actionpack (= 6.0
|
16
|
-
activejob (= 6.0
|
17
|
-
activerecord (= 6.0
|
18
|
-
activestorage (= 6.0
|
19
|
-
activesupport (= 6.0
|
15
|
+
actionmailbox (6.1.0)
|
16
|
+
actionpack (= 6.1.0)
|
17
|
+
activejob (= 6.1.0)
|
18
|
+
activerecord (= 6.1.0)
|
19
|
+
activestorage (= 6.1.0)
|
20
|
+
activesupport (= 6.1.0)
|
20
21
|
mail (>= 2.7.1)
|
21
|
-
actionmailer (6.0
|
22
|
-
actionpack (= 6.0
|
23
|
-
actionview (= 6.0
|
24
|
-
activejob (= 6.0
|
22
|
+
actionmailer (6.1.0)
|
23
|
+
actionpack (= 6.1.0)
|
24
|
+
actionview (= 6.1.0)
|
25
|
+
activejob (= 6.1.0)
|
26
|
+
activesupport (= 6.1.0)
|
25
27
|
mail (~> 2.5, >= 2.5.4)
|
26
28
|
rails-dom-testing (~> 2.0)
|
27
|
-
actionpack (6.0
|
28
|
-
actionview (= 6.0
|
29
|
-
activesupport (= 6.0
|
30
|
-
rack (~> 2.0, >= 2.0.
|
29
|
+
actionpack (6.1.0)
|
30
|
+
actionview (= 6.1.0)
|
31
|
+
activesupport (= 6.1.0)
|
32
|
+
rack (~> 2.0, >= 2.0.9)
|
31
33
|
rack-test (>= 0.6.3)
|
32
34
|
rails-dom-testing (~> 2.0)
|
33
35
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
-
actiontext (6.0
|
35
|
-
actionpack (= 6.0
|
36
|
-
activerecord (= 6.0
|
37
|
-
activestorage (= 6.0
|
38
|
-
activesupport (= 6.0
|
36
|
+
actiontext (6.1.0)
|
37
|
+
actionpack (= 6.1.0)
|
38
|
+
activerecord (= 6.1.0)
|
39
|
+
activestorage (= 6.1.0)
|
40
|
+
activesupport (= 6.1.0)
|
39
41
|
nokogiri (>= 1.8.5)
|
40
|
-
actionview (6.0
|
41
|
-
activesupport (= 6.0
|
42
|
+
actionview (6.1.0)
|
43
|
+
activesupport (= 6.1.0)
|
42
44
|
builder (~> 3.1)
|
43
45
|
erubi (~> 1.4)
|
44
46
|
rails-dom-testing (~> 2.0)
|
45
47
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
-
activejob (6.0
|
47
|
-
activesupport (= 6.0
|
48
|
+
activejob (6.1.0)
|
49
|
+
activesupport (= 6.1.0)
|
48
50
|
globalid (>= 0.3.6)
|
49
|
-
activemodel (6.0
|
50
|
-
activesupport (= 6.0
|
51
|
-
activerecord (6.0
|
52
|
-
activemodel (= 6.0
|
53
|
-
activesupport (= 6.0
|
54
|
-
activestorage (6.0
|
55
|
-
actionpack (= 6.0
|
56
|
-
activejob (= 6.0
|
57
|
-
activerecord (= 6.0
|
51
|
+
activemodel (6.1.0)
|
52
|
+
activesupport (= 6.1.0)
|
53
|
+
activerecord (6.1.0)
|
54
|
+
activemodel (= 6.1.0)
|
55
|
+
activesupport (= 6.1.0)
|
56
|
+
activestorage (6.1.0)
|
57
|
+
actionpack (= 6.1.0)
|
58
|
+
activejob (= 6.1.0)
|
59
|
+
activerecord (= 6.1.0)
|
60
|
+
activesupport (= 6.1.0)
|
58
61
|
marcel (~> 0.3.1)
|
59
|
-
|
62
|
+
mimemagic (~> 0.3.2)
|
63
|
+
activesupport (6.1.0)
|
60
64
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
61
|
-
i18n (>=
|
62
|
-
minitest (
|
63
|
-
tzinfo (~>
|
64
|
-
zeitwerk (~> 2.
|
65
|
+
i18n (>= 1.6, < 2)
|
66
|
+
minitest (>= 5.1)
|
67
|
+
tzinfo (~> 2.0)
|
68
|
+
zeitwerk (~> 2.3)
|
65
69
|
builder (3.2.4)
|
66
|
-
concurrent-ruby (1.1.
|
70
|
+
concurrent-ruby (1.1.7)
|
67
71
|
crass (1.0.6)
|
68
|
-
erubi (1.
|
72
|
+
erubi (1.10.0)
|
69
73
|
globalid (0.4.2)
|
70
74
|
activesupport (>= 4.2.0)
|
71
|
-
i18n (1.8.
|
75
|
+
i18n (1.8.5)
|
72
76
|
concurrent-ruby (~> 1.0)
|
73
|
-
loofah (2.
|
77
|
+
loofah (2.8.0)
|
74
78
|
crass (~> 1.0.2)
|
75
79
|
nokogiri (>= 1.5.9)
|
76
80
|
mail (2.7.1)
|
77
81
|
mini_mime (>= 0.1.1)
|
78
82
|
marcel (0.3.3)
|
79
83
|
mimemagic (~> 0.3.2)
|
80
|
-
method_source (0.
|
81
|
-
mimemagic (0.3.
|
84
|
+
method_source (1.0.0)
|
85
|
+
mimemagic (0.3.5)
|
82
86
|
mini_mime (1.0.2)
|
83
87
|
mini_portile2 (2.4.0)
|
84
|
-
minitest (5.14.
|
85
|
-
nio4r (2.5.
|
86
|
-
nokogiri (1.10.
|
88
|
+
minitest (5.14.2)
|
89
|
+
nio4r (2.5.4)
|
90
|
+
nokogiri (1.10.10)
|
87
91
|
mini_portile2 (~> 2.4.0)
|
88
|
-
rack (2.2.
|
92
|
+
rack (2.2.3)
|
89
93
|
rack-test (1.1.0)
|
90
94
|
rack (>= 1.0, < 3)
|
91
|
-
rails (6.0
|
92
|
-
actioncable (= 6.0
|
93
|
-
actionmailbox (= 6.0
|
94
|
-
actionmailer (= 6.0
|
95
|
-
actionpack (= 6.0
|
96
|
-
actiontext (= 6.0
|
97
|
-
actionview (= 6.0
|
98
|
-
activejob (= 6.0
|
99
|
-
activemodel (= 6.0
|
100
|
-
activerecord (= 6.0
|
101
|
-
activestorage (= 6.0
|
102
|
-
activesupport (= 6.0
|
103
|
-
bundler (>= 1.
|
104
|
-
railties (= 6.0
|
95
|
+
rails (6.1.0)
|
96
|
+
actioncable (= 6.1.0)
|
97
|
+
actionmailbox (= 6.1.0)
|
98
|
+
actionmailer (= 6.1.0)
|
99
|
+
actionpack (= 6.1.0)
|
100
|
+
actiontext (= 6.1.0)
|
101
|
+
actionview (= 6.1.0)
|
102
|
+
activejob (= 6.1.0)
|
103
|
+
activemodel (= 6.1.0)
|
104
|
+
activerecord (= 6.1.0)
|
105
|
+
activestorage (= 6.1.0)
|
106
|
+
activesupport (= 6.1.0)
|
107
|
+
bundler (>= 1.15.0)
|
108
|
+
railties (= 6.1.0)
|
105
109
|
sprockets-rails (>= 2.0.0)
|
106
110
|
rails-dom-testing (2.0.3)
|
107
111
|
activesupport (>= 4.2.0)
|
108
112
|
nokogiri (>= 1.6)
|
109
113
|
rails-html-sanitizer (1.3.0)
|
110
114
|
loofah (~> 2.3)
|
111
|
-
railties (6.0
|
112
|
-
actionpack (= 6.0
|
113
|
-
activesupport (= 6.0
|
115
|
+
railties (6.1.0)
|
116
|
+
actionpack (= 6.1.0)
|
117
|
+
activesupport (= 6.1.0)
|
114
118
|
method_source
|
115
119
|
rake (>= 0.8.7)
|
116
|
-
thor (
|
117
|
-
rake (13.0.
|
118
|
-
sprockets (4.0.
|
120
|
+
thor (~> 1.0)
|
121
|
+
rake (13.0.3)
|
122
|
+
sprockets (4.0.2)
|
119
123
|
concurrent-ruby (~> 1.0)
|
120
124
|
rack (> 1, < 3)
|
121
|
-
sprockets-rails (3.2.
|
125
|
+
sprockets-rails (3.2.2)
|
122
126
|
actionpack (>= 4.0)
|
123
127
|
activesupport (>= 4.0)
|
124
128
|
sprockets (>= 3.0.0)
|
125
129
|
thor (1.0.1)
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
websocket-driver (0.7.1)
|
130
|
+
tzinfo (2.0.4)
|
131
|
+
concurrent-ruby (~> 1.0)
|
132
|
+
websocket-driver (0.7.3)
|
130
133
|
websocket-extensions (>= 0.1.0)
|
131
|
-
websocket-extensions (0.1.
|
132
|
-
zeitwerk (2.
|
134
|
+
websocket-extensions (0.1.5)
|
135
|
+
zeitwerk (2.4.2)
|
133
136
|
|
134
137
|
PLATFORMS
|
135
138
|
ruby
|
data/README.md
CHANGED
@@ -70,7 +70,7 @@ LogSanity.fields['user'] ||= {}
|
|
70
70
|
LogSanity.fields['user']['id'] = current_user.id
|
71
71
|
```
|
72
72
|
|
73
|
-
It's also possible to add attributes via Rails existing `log_tags` facility, which is documented more below.
|
73
|
+
It's also possible to add attributes via Rails' existing `log_tags` facility, which is documented more below.
|
74
74
|
|
75
75
|
|
76
76
|
##### Logging complete entries
|
@@ -172,7 +172,7 @@ There are still some things that could be handled better (such as multi-line str
|
|
172
172
|
|
173
173
|
Pull requests are welcomed and encouraged. The only goal is to avoid making things unnecessarily complex.
|
174
174
|
|
175
|
-
Tested on Rails 5.2
|
175
|
+
Tested on Rails 5.2 through 6.1 (or later). Anything older is untested. Small patches for older compatibility will be considered.
|
176
176
|
|
177
177
|
License: MIT
|
178
178
|
|
data/lib/log_sanity/railtie.rb
CHANGED
@@ -26,7 +26,15 @@ module LogSanity
|
|
26
26
|
end
|
27
27
|
if defined?(ActiveJob)
|
28
28
|
require 'active_job/logging'
|
29
|
-
|
29
|
+
begin
|
30
|
+
require 'active_job/log_subscriber' # >= 6.1
|
31
|
+
rescue LoadError
|
32
|
+
end
|
33
|
+
if defined?(ActiveJob::LogSubscriber) # >= 6.1
|
34
|
+
ActiveJob::LogSubscriber.detach_from :active_job
|
35
|
+
else # < 6.1
|
36
|
+
ActiveJob::Logging::LogSubscriber.detach_from :active_job
|
37
|
+
end
|
30
38
|
end
|
31
39
|
if defined?(ActiveRecord)
|
32
40
|
if ActiveRecord::Base.logger.debug?
|
data/lib/log_sanity/version.rb
CHANGED
data/log_sanity.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: log_sanity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thomas morgan
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '5'
|
19
|
+
version: '5.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6.
|
22
|
+
version: '6.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '5'
|
29
|
+
version: '5.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6.
|
32
|
+
version: '6.2'
|
33
33
|
description: LogSanity - Bring sanity to Rails logs by reducing verbosity, using json
|
34
34
|
output, and more.
|
35
35
|
email:
|
@@ -106,7 +106,7 @@ homepage: https://github.com/zarqman/log_sanity
|
|
106
106
|
licenses:
|
107
107
|
- MIT
|
108
108
|
metadata: {}
|
109
|
-
post_install_message:
|
109
|
+
post_install_message:
|
110
110
|
rdoc_options: []
|
111
111
|
require_paths:
|
112
112
|
- lib
|
@@ -121,8 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.0.
|
125
|
-
signing_key:
|
124
|
+
rubygems_version: 3.0.9
|
125
|
+
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: LogSanity - Bring sanity to Rails logs
|
128
128
|
test_files:
|