log_sanity 2.1.2 → 2.3.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 +9 -0
- data/Gemfile.lock +95 -96
- data/README.md +0 -2
- data/lib/log_sanity/log_subscribers/action_controller.rb +11 -1
- data/lib/log_sanity/version.rb +1 -1
- data/log_sanity.gemspec +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: d613c22d31fcb596cc1e0f541fc0ad4276c15f676bb745bdb6a25bef91776ff7
|
4
|
+
data.tar.gz: ae3e8726988cfb06a3abc80cb0bcab3c589a8be69734daa12ab5e292973bfd39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d105457230a833fe578edbdc5ba963b52cf66236341aa5f80fc634a2e9f954ec82eba63c55467bfac50fb505f732131b7312cb223e517178aa433f8fa2b2346a
|
7
|
+
data.tar.gz: 59b7a90ce10d634523831e778699c4e5e56419e00db9d09979b56a50052c8332647161274a93ee8666ff0db2aa9508c5f6a53088a2334de7534cb3c0939d4594
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,104 +1,103 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
log_sanity (2.
|
5
|
-
rails (>= 7.1.2, <
|
4
|
+
log_sanity (2.3.0)
|
5
|
+
rails (>= 7.1.2, < 8.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (
|
11
|
-
actionpack (=
|
12
|
-
activesupport (=
|
10
|
+
actioncable (8.0.0)
|
11
|
+
actionpack (= 8.0.0)
|
12
|
+
activesupport (= 8.0.0)
|
13
13
|
nio4r (~> 2.0)
|
14
14
|
websocket-driver (>= 0.6.1)
|
15
15
|
zeitwerk (~> 2.6)
|
16
|
-
actionmailbox (
|
17
|
-
actionpack (=
|
18
|
-
activejob (=
|
19
|
-
activerecord (=
|
20
|
-
activestorage (=
|
21
|
-
activesupport (=
|
22
|
-
mail (>= 2.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
activejob (= 7.1.3.2)
|
30
|
-
activesupport (= 7.1.3.2)
|
31
|
-
mail (~> 2.5, >= 2.5.4)
|
32
|
-
net-imap
|
33
|
-
net-pop
|
34
|
-
net-smtp
|
16
|
+
actionmailbox (8.0.0)
|
17
|
+
actionpack (= 8.0.0)
|
18
|
+
activejob (= 8.0.0)
|
19
|
+
activerecord (= 8.0.0)
|
20
|
+
activestorage (= 8.0.0)
|
21
|
+
activesupport (= 8.0.0)
|
22
|
+
mail (>= 2.8.0)
|
23
|
+
actionmailer (8.0.0)
|
24
|
+
actionpack (= 8.0.0)
|
25
|
+
actionview (= 8.0.0)
|
26
|
+
activejob (= 8.0.0)
|
27
|
+
activesupport (= 8.0.0)
|
28
|
+
mail (>= 2.8.0)
|
35
29
|
rails-dom-testing (~> 2.2)
|
36
|
-
actionpack (
|
37
|
-
actionview (=
|
38
|
-
activesupport (=
|
30
|
+
actionpack (8.0.0)
|
31
|
+
actionview (= 8.0.0)
|
32
|
+
activesupport (= 8.0.0)
|
39
33
|
nokogiri (>= 1.8.5)
|
40
|
-
racc
|
41
34
|
rack (>= 2.2.4)
|
42
35
|
rack-session (>= 1.0.1)
|
43
36
|
rack-test (>= 0.6.3)
|
44
37
|
rails-dom-testing (~> 2.2)
|
45
38
|
rails-html-sanitizer (~> 1.6)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
39
|
+
useragent (~> 0.16)
|
40
|
+
actiontext (8.0.0)
|
41
|
+
actionpack (= 8.0.0)
|
42
|
+
activerecord (= 8.0.0)
|
43
|
+
activestorage (= 8.0.0)
|
44
|
+
activesupport (= 8.0.0)
|
51
45
|
globalid (>= 0.6.0)
|
52
46
|
nokogiri (>= 1.8.5)
|
53
|
-
actionview (
|
54
|
-
activesupport (=
|
47
|
+
actionview (8.0.0)
|
48
|
+
activesupport (= 8.0.0)
|
55
49
|
builder (~> 3.1)
|
56
50
|
erubi (~> 1.11)
|
57
51
|
rails-dom-testing (~> 2.2)
|
58
52
|
rails-html-sanitizer (~> 1.6)
|
59
|
-
activejob (
|
60
|
-
activesupport (=
|
53
|
+
activejob (8.0.0)
|
54
|
+
activesupport (= 8.0.0)
|
61
55
|
globalid (>= 0.3.6)
|
62
|
-
activemodel (
|
63
|
-
activesupport (=
|
64
|
-
activerecord (
|
65
|
-
activemodel (=
|
66
|
-
activesupport (=
|
56
|
+
activemodel (8.0.0)
|
57
|
+
activesupport (= 8.0.0)
|
58
|
+
activerecord (8.0.0)
|
59
|
+
activemodel (= 8.0.0)
|
60
|
+
activesupport (= 8.0.0)
|
67
61
|
timeout (>= 0.4.0)
|
68
|
-
activestorage (
|
69
|
-
actionpack (=
|
70
|
-
activejob (=
|
71
|
-
activerecord (=
|
72
|
-
activesupport (=
|
62
|
+
activestorage (8.0.0)
|
63
|
+
actionpack (= 8.0.0)
|
64
|
+
activejob (= 8.0.0)
|
65
|
+
activerecord (= 8.0.0)
|
66
|
+
activesupport (= 8.0.0)
|
73
67
|
marcel (~> 1.0)
|
74
|
-
activesupport (
|
68
|
+
activesupport (8.0.0)
|
75
69
|
base64
|
70
|
+
benchmark (>= 0.3)
|
76
71
|
bigdecimal
|
77
|
-
concurrent-ruby (~> 1.0, >= 1.
|
72
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
78
73
|
connection_pool (>= 2.2.5)
|
79
74
|
drb
|
80
75
|
i18n (>= 1.6, < 2)
|
76
|
+
logger (>= 1.4.2)
|
81
77
|
minitest (>= 5.1)
|
82
|
-
|
83
|
-
tzinfo (~> 2.0)
|
78
|
+
securerandom (>= 0.3)
|
79
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
80
|
+
uri (>= 0.13.1)
|
84
81
|
base64 (0.2.0)
|
85
|
-
|
86
|
-
|
87
|
-
|
82
|
+
benchmark (0.4.0)
|
83
|
+
bigdecimal (3.1.8)
|
84
|
+
builder (3.3.0)
|
85
|
+
concurrent-ruby (1.3.4)
|
88
86
|
connection_pool (2.4.1)
|
89
87
|
crass (1.0.6)
|
90
|
-
date (3.
|
88
|
+
date (3.4.0)
|
91
89
|
drb (2.2.1)
|
92
|
-
erubi (1.
|
90
|
+
erubi (1.13.0)
|
93
91
|
globalid (1.2.1)
|
94
92
|
activesupport (>= 6.1)
|
95
|
-
i18n (1.14.
|
93
|
+
i18n (1.14.6)
|
96
94
|
concurrent-ruby (~> 1.0)
|
97
95
|
io-console (0.7.2)
|
98
|
-
irb (1.
|
96
|
+
irb (1.14.1)
|
99
97
|
rdoc (>= 4.0.0)
|
100
98
|
reline (>= 0.4.2)
|
101
|
-
|
99
|
+
logger (1.6.1)
|
100
|
+
loofah (2.23.1)
|
102
101
|
crass (~> 1.0.2)
|
103
102
|
nokogiri (>= 1.12.0)
|
104
103
|
mail (2.8.1)
|
@@ -108,9 +107,8 @@ GEM
|
|
108
107
|
net-smtp
|
109
108
|
marcel (1.0.4)
|
110
109
|
mini_mime (1.1.5)
|
111
|
-
minitest (5.
|
112
|
-
|
113
|
-
net-imap (0.4.10)
|
110
|
+
minitest (5.25.2)
|
111
|
+
net-imap (0.5.1)
|
114
112
|
date
|
115
113
|
net-protocol
|
116
114
|
net-pop (0.1.2)
|
@@ -119,38 +117,37 @@ GEM
|
|
119
117
|
timeout
|
120
118
|
net-smtp (0.5.0)
|
121
119
|
net-protocol
|
122
|
-
nio4r (2.7.
|
123
|
-
nokogiri (1.16.
|
120
|
+
nio4r (2.7.4)
|
121
|
+
nokogiri (1.16.7-arm64-darwin)
|
124
122
|
racc (~> 1.4)
|
125
|
-
nokogiri (1.16.
|
123
|
+
nokogiri (1.16.7-x86_64-darwin)
|
126
124
|
racc (~> 1.4)
|
127
|
-
nokogiri (1.16.
|
125
|
+
nokogiri (1.16.7-x86_64-linux)
|
128
126
|
racc (~> 1.4)
|
129
|
-
psych (5.
|
127
|
+
psych (5.2.0)
|
130
128
|
stringio
|
131
|
-
racc (1.
|
132
|
-
rack (3.
|
129
|
+
racc (1.8.1)
|
130
|
+
rack (3.1.8)
|
133
131
|
rack-session (2.0.0)
|
134
132
|
rack (>= 3.0.0)
|
135
133
|
rack-test (2.1.0)
|
136
134
|
rack (>= 1.3)
|
137
|
-
rackup (2.1
|
135
|
+
rackup (2.2.1)
|
138
136
|
rack (>= 3)
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
activesupport (= 7.1.3.2)
|
137
|
+
rails (8.0.0)
|
138
|
+
actioncable (= 8.0.0)
|
139
|
+
actionmailbox (= 8.0.0)
|
140
|
+
actionmailer (= 8.0.0)
|
141
|
+
actionpack (= 8.0.0)
|
142
|
+
actiontext (= 8.0.0)
|
143
|
+
actionview (= 8.0.0)
|
144
|
+
activejob (= 8.0.0)
|
145
|
+
activemodel (= 8.0.0)
|
146
|
+
activerecord (= 8.0.0)
|
147
|
+
activestorage (= 8.0.0)
|
148
|
+
activesupport (= 8.0.0)
|
152
149
|
bundler (>= 1.15.0)
|
153
|
-
railties (=
|
150
|
+
railties (= 8.0.0)
|
154
151
|
rails-dom-testing (2.2.0)
|
155
152
|
activesupport (>= 5.0.0)
|
156
153
|
minitest
|
@@ -158,29 +155,31 @@ GEM
|
|
158
155
|
rails-html-sanitizer (1.6.0)
|
159
156
|
loofah (~> 2.21)
|
160
157
|
nokogiri (~> 1.14)
|
161
|
-
railties (
|
162
|
-
actionpack (=
|
163
|
-
activesupport (=
|
164
|
-
irb
|
158
|
+
railties (8.0.0)
|
159
|
+
actionpack (= 8.0.0)
|
160
|
+
activesupport (= 8.0.0)
|
161
|
+
irb (~> 1.13)
|
165
162
|
rackup (>= 1.0.0)
|
166
163
|
rake (>= 12.2)
|
167
164
|
thor (~> 1.0, >= 1.2.2)
|
168
165
|
zeitwerk (~> 2.6)
|
169
166
|
rake (13.2.1)
|
170
|
-
rdoc (6.
|
167
|
+
rdoc (6.8.1)
|
171
168
|
psych (>= 4.0.0)
|
172
|
-
reline (0.5.
|
169
|
+
reline (0.5.11)
|
173
170
|
io-console (~> 0.5)
|
174
|
-
|
175
|
-
|
176
|
-
|
171
|
+
securerandom (0.3.2)
|
172
|
+
stringio (3.1.2)
|
173
|
+
thor (1.3.2)
|
174
|
+
timeout (0.4.2)
|
177
175
|
tzinfo (2.0.6)
|
178
176
|
concurrent-ruby (~> 1.0)
|
179
|
-
|
177
|
+
uri (1.0.2)
|
178
|
+
useragent (0.16.10)
|
180
179
|
websocket-driver (0.7.6)
|
181
180
|
websocket-extensions (>= 0.1.0)
|
182
181
|
websocket-extensions (0.1.5)
|
183
|
-
zeitwerk (2.
|
182
|
+
zeitwerk (2.7.1)
|
184
183
|
|
185
184
|
PLATFORMS
|
186
185
|
arm64-darwin
|
@@ -191,4 +190,4 @@ DEPENDENCIES
|
|
191
190
|
log_sanity!
|
192
191
|
|
193
192
|
BUNDLED WITH
|
194
|
-
2.
|
193
|
+
2.5.22
|
data/README.md
CHANGED
@@ -185,8 +185,6 @@ There are still some things that could be handled better (such as multi-line str
|
|
185
185
|
|
186
186
|
Pull requests are welcomed and encouraged. The only goal is to avoid making things unnecessarily complex.
|
187
187
|
|
188
|
-
Tested on Rails 5.2 through 7.1 (or later). Anything older is untested. Small patches for older compatibility will be considered.
|
189
|
-
|
190
188
|
License: MIT
|
191
189
|
|
192
190
|
|
@@ -23,14 +23,24 @@ module LogSanity
|
|
23
23
|
end
|
24
24
|
|
25
25
|
durations = {'total' => event.duration.round}
|
26
|
+
queries = {}
|
26
27
|
additions = ::ActionController::Base.log_process_action(payload)
|
27
28
|
additions.each do |add|
|
28
29
|
if add =~ /^([^:]+):?\s*([0-9.]+)(ms)?/
|
29
30
|
ms = $2.to_f.round
|
30
|
-
|
31
|
+
name = $1.downcase
|
32
|
+
durations[name] = ms if ms > 0
|
33
|
+
end
|
34
|
+
if name and add =~ /[^0-9]([0-9]+) quer/
|
35
|
+
q_real = $1.to_i
|
36
|
+
if q_real > 0 and add =~ /[^0-9]([0-9]+) cached/
|
37
|
+
q_real -= $1.to_i # exclude cached queries
|
38
|
+
end
|
39
|
+
queries[name] = q_real if q_real > 0
|
31
40
|
end
|
32
41
|
end
|
33
42
|
|
43
|
+
log 'queries', queries if queries.any?
|
34
44
|
log 'duration', durations
|
35
45
|
log 'status', status
|
36
46
|
end
|
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: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thomas morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 7.1.2
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 7.1.2
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8.1'
|
33
33
|
description: LogSanity - Bring sanity to Rails logs by reducing verbosity, using json
|
34
34
|
output, and more.
|
35
35
|
email:
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.5.
|
124
|
+
rubygems_version: 3.5.22
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: LogSanity - Bring sanity to Rails logs
|