log_sanity 2.1.2 → 2.2.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 +5 -0
- data/Gemfile.lock +87 -90
- 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: 334adfd10ad13c52b7a3e24973adb808447737f1f7099576aac44b21c871df46
|
4
|
+
data.tar.gz: dcfab6f923a4d6ccce9d57f57c10c8b883ff4729a2e36fa977be03c58f631487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0776a645c92e2fcc3bb17c1df01b364c5ad070690c388628060461a8a1c1880cee6bfa5605eb53d24443bbdec853407bb3f9ebafbc76a7b799cd3278bf3c2eb9
|
7
|
+
data.tar.gz: a964344a187aaccc49c3eda2dddd8f17077541b9b836eb836507cda7980c608818510e3e6330df1d51602d27fe7e7c1b46b50d456e92b4296033173a77167dde
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,103 +1,100 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
log_sanity (2.
|
5
|
-
rails (>= 7.1.2, < 7.
|
4
|
+
log_sanity (2.2.0)
|
5
|
+
rails (>= 7.1.2, < 7.3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (7.1
|
11
|
-
actionpack (= 7.1
|
12
|
-
activesupport (= 7.1
|
10
|
+
actioncable (7.2.1)
|
11
|
+
actionpack (= 7.2.1)
|
12
|
+
activesupport (= 7.2.1)
|
13
13
|
nio4r (~> 2.0)
|
14
14
|
websocket-driver (>= 0.6.1)
|
15
15
|
zeitwerk (~> 2.6)
|
16
|
-
actionmailbox (7.1
|
17
|
-
actionpack (= 7.1
|
18
|
-
activejob (= 7.1
|
19
|
-
activerecord (= 7.1
|
20
|
-
activestorage (= 7.1
|
21
|
-
activesupport (= 7.1
|
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 (7.2.1)
|
17
|
+
actionpack (= 7.2.1)
|
18
|
+
activejob (= 7.2.1)
|
19
|
+
activerecord (= 7.2.1)
|
20
|
+
activestorage (= 7.2.1)
|
21
|
+
activesupport (= 7.2.1)
|
22
|
+
mail (>= 2.8.0)
|
23
|
+
actionmailer (7.2.1)
|
24
|
+
actionpack (= 7.2.1)
|
25
|
+
actionview (= 7.2.1)
|
26
|
+
activejob (= 7.2.1)
|
27
|
+
activesupport (= 7.2.1)
|
28
|
+
mail (>= 2.8.0)
|
35
29
|
rails-dom-testing (~> 2.2)
|
36
|
-
actionpack (7.1
|
37
|
-
actionview (= 7.1
|
38
|
-
activesupport (= 7.1
|
30
|
+
actionpack (7.2.1)
|
31
|
+
actionview (= 7.2.1)
|
32
|
+
activesupport (= 7.2.1)
|
39
33
|
nokogiri (>= 1.8.5)
|
40
34
|
racc
|
41
|
-
rack (>= 2.2.4)
|
35
|
+
rack (>= 2.2.4, < 3.2)
|
42
36
|
rack-session (>= 1.0.1)
|
43
37
|
rack-test (>= 0.6.3)
|
44
38
|
rails-dom-testing (~> 2.2)
|
45
39
|
rails-html-sanitizer (~> 1.6)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
40
|
+
useragent (~> 0.16)
|
41
|
+
actiontext (7.2.1)
|
42
|
+
actionpack (= 7.2.1)
|
43
|
+
activerecord (= 7.2.1)
|
44
|
+
activestorage (= 7.2.1)
|
45
|
+
activesupport (= 7.2.1)
|
51
46
|
globalid (>= 0.6.0)
|
52
47
|
nokogiri (>= 1.8.5)
|
53
|
-
actionview (7.1
|
54
|
-
activesupport (= 7.1
|
48
|
+
actionview (7.2.1)
|
49
|
+
activesupport (= 7.2.1)
|
55
50
|
builder (~> 3.1)
|
56
51
|
erubi (~> 1.11)
|
57
52
|
rails-dom-testing (~> 2.2)
|
58
53
|
rails-html-sanitizer (~> 1.6)
|
59
|
-
activejob (7.1
|
60
|
-
activesupport (= 7.1
|
54
|
+
activejob (7.2.1)
|
55
|
+
activesupport (= 7.2.1)
|
61
56
|
globalid (>= 0.3.6)
|
62
|
-
activemodel (7.1
|
63
|
-
activesupport (= 7.1
|
64
|
-
activerecord (7.1
|
65
|
-
activemodel (= 7.1
|
66
|
-
activesupport (= 7.1
|
57
|
+
activemodel (7.2.1)
|
58
|
+
activesupport (= 7.2.1)
|
59
|
+
activerecord (7.2.1)
|
60
|
+
activemodel (= 7.2.1)
|
61
|
+
activesupport (= 7.2.1)
|
67
62
|
timeout (>= 0.4.0)
|
68
|
-
activestorage (7.1
|
69
|
-
actionpack (= 7.1
|
70
|
-
activejob (= 7.1
|
71
|
-
activerecord (= 7.1
|
72
|
-
activesupport (= 7.1
|
63
|
+
activestorage (7.2.1)
|
64
|
+
actionpack (= 7.2.1)
|
65
|
+
activejob (= 7.2.1)
|
66
|
+
activerecord (= 7.2.1)
|
67
|
+
activesupport (= 7.2.1)
|
73
68
|
marcel (~> 1.0)
|
74
|
-
activesupport (7.1
|
69
|
+
activesupport (7.2.1)
|
75
70
|
base64
|
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)
|
84
80
|
base64 (0.2.0)
|
85
|
-
bigdecimal (3.1.
|
86
|
-
builder (3.
|
87
|
-
concurrent-ruby (1.
|
81
|
+
bigdecimal (3.1.8)
|
82
|
+
builder (3.3.0)
|
83
|
+
concurrent-ruby (1.3.4)
|
88
84
|
connection_pool (2.4.1)
|
89
85
|
crass (1.0.6)
|
90
86
|
date (3.3.4)
|
91
87
|
drb (2.2.1)
|
92
|
-
erubi (1.
|
88
|
+
erubi (1.13.0)
|
93
89
|
globalid (1.2.1)
|
94
90
|
activesupport (>= 6.1)
|
95
|
-
i18n (1.14.
|
91
|
+
i18n (1.14.6)
|
96
92
|
concurrent-ruby (~> 1.0)
|
97
93
|
io-console (0.7.2)
|
98
|
-
irb (1.
|
94
|
+
irb (1.14.0)
|
99
95
|
rdoc (>= 4.0.0)
|
100
96
|
reline (>= 0.4.2)
|
97
|
+
logger (1.6.1)
|
101
98
|
loofah (2.22.0)
|
102
99
|
crass (~> 1.0.2)
|
103
100
|
nokogiri (>= 1.12.0)
|
@@ -108,28 +105,26 @@ GEM
|
|
108
105
|
net-smtp
|
109
106
|
marcel (1.0.4)
|
110
107
|
mini_mime (1.1.5)
|
111
|
-
minitest (5.
|
112
|
-
|
113
|
-
net-imap (0.4.10)
|
108
|
+
minitest (5.25.1)
|
109
|
+
net-imap (0.4.16)
|
114
110
|
date
|
115
111
|
net-protocol
|
116
112
|
net-pop (0.1.2)
|
117
|
-
net-protocol
|
118
113
|
net-protocol (0.2.2)
|
119
114
|
timeout
|
120
115
|
net-smtp (0.5.0)
|
121
116
|
net-protocol
|
122
|
-
nio4r (2.7.
|
123
|
-
nokogiri (1.16.
|
117
|
+
nio4r (2.7.3)
|
118
|
+
nokogiri (1.16.7-arm64-darwin)
|
124
119
|
racc (~> 1.4)
|
125
|
-
nokogiri (1.16.
|
120
|
+
nokogiri (1.16.7-x86_64-darwin)
|
126
121
|
racc (~> 1.4)
|
127
|
-
nokogiri (1.16.
|
122
|
+
nokogiri (1.16.7-x86_64-linux)
|
128
123
|
racc (~> 1.4)
|
129
124
|
psych (5.1.2)
|
130
125
|
stringio
|
131
|
-
racc (1.
|
132
|
-
rack (3.
|
126
|
+
racc (1.8.1)
|
127
|
+
rack (3.1.7)
|
133
128
|
rack-session (2.0.0)
|
134
129
|
rack (>= 3.0.0)
|
135
130
|
rack-test (2.1.0)
|
@@ -137,20 +132,20 @@ GEM
|
|
137
132
|
rackup (2.1.0)
|
138
133
|
rack (>= 3)
|
139
134
|
webrick (~> 1.8)
|
140
|
-
rails (7.1
|
141
|
-
actioncable (= 7.1
|
142
|
-
actionmailbox (= 7.1
|
143
|
-
actionmailer (= 7.1
|
144
|
-
actionpack (= 7.1
|
145
|
-
actiontext (= 7.1
|
146
|
-
actionview (= 7.1
|
147
|
-
activejob (= 7.1
|
148
|
-
activemodel (= 7.1
|
149
|
-
activerecord (= 7.1
|
150
|
-
activestorage (= 7.1
|
151
|
-
activesupport (= 7.1
|
135
|
+
rails (7.2.1)
|
136
|
+
actioncable (= 7.2.1)
|
137
|
+
actionmailbox (= 7.2.1)
|
138
|
+
actionmailer (= 7.2.1)
|
139
|
+
actionpack (= 7.2.1)
|
140
|
+
actiontext (= 7.2.1)
|
141
|
+
actionview (= 7.2.1)
|
142
|
+
activejob (= 7.2.1)
|
143
|
+
activemodel (= 7.2.1)
|
144
|
+
activerecord (= 7.2.1)
|
145
|
+
activestorage (= 7.2.1)
|
146
|
+
activesupport (= 7.2.1)
|
152
147
|
bundler (>= 1.15.0)
|
153
|
-
railties (= 7.1
|
148
|
+
railties (= 7.2.1)
|
154
149
|
rails-dom-testing (2.2.0)
|
155
150
|
activesupport (>= 5.0.0)
|
156
151
|
minitest
|
@@ -158,29 +153,31 @@ GEM
|
|
158
153
|
rails-html-sanitizer (1.6.0)
|
159
154
|
loofah (~> 2.21)
|
160
155
|
nokogiri (~> 1.14)
|
161
|
-
railties (7.1
|
162
|
-
actionpack (= 7.1
|
163
|
-
activesupport (= 7.1
|
164
|
-
irb
|
156
|
+
railties (7.2.1)
|
157
|
+
actionpack (= 7.2.1)
|
158
|
+
activesupport (= 7.2.1)
|
159
|
+
irb (~> 1.13)
|
165
160
|
rackup (>= 1.0.0)
|
166
161
|
rake (>= 12.2)
|
167
162
|
thor (~> 1.0, >= 1.2.2)
|
168
163
|
zeitwerk (~> 2.6)
|
169
164
|
rake (13.2.1)
|
170
|
-
rdoc (6.
|
165
|
+
rdoc (6.7.0)
|
171
166
|
psych (>= 4.0.0)
|
172
|
-
reline (0.5.
|
167
|
+
reline (0.5.10)
|
173
168
|
io-console (~> 0.5)
|
174
|
-
|
175
|
-
|
169
|
+
securerandom (0.3.1)
|
170
|
+
stringio (3.1.1)
|
171
|
+
thor (1.3.2)
|
176
172
|
timeout (0.4.1)
|
177
173
|
tzinfo (2.0.6)
|
178
174
|
concurrent-ruby (~> 1.0)
|
175
|
+
useragent (0.16.10)
|
179
176
|
webrick (1.8.1)
|
180
177
|
websocket-driver (0.7.6)
|
181
178
|
websocket-extensions (>= 0.1.0)
|
182
179
|
websocket-extensions (0.1.5)
|
183
|
-
zeitwerk (2.6.
|
180
|
+
zeitwerk (2.6.18)
|
184
181
|
|
185
182
|
PLATFORMS
|
186
183
|
arm64-darwin
|
@@ -191,4 +188,4 @@ DEPENDENCIES
|
|
191
188
|
log_sanity!
|
192
189
|
|
193
190
|
BUNDLED WITH
|
194
|
-
2.
|
191
|
+
2.5.11
|
@@ -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.2.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-09-21 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: '7.
|
22
|
+
version: '7.3'
|
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: '7.
|
32
|
+
version: '7.3'
|
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.11
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: LogSanity - Bring sanity to Rails logs
|