log_sanity 2.3.0 → 2.4.0
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/Gemfile.lock +118 -99
- data/LICENSE +1 -1
- data/lib/log_sanity/log_subscribers/action_controller.rb +2 -2
- data/lib/log_sanity/log_subscribers/action_dispatch.rb +14 -8
- data/lib/log_sanity/version.rb +1 -1
- data/log_sanity.gemspec +14 -14
- metadata +5 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4fefbc5ff00cc5187c607a0cb5521821be7e73ff8cba488a55e604b77f817715
|
|
4
|
+
data.tar.gz: 64ac53ae8c117cc57009c791f7c0b4c9050658ce52581a95fda611ca2221d14a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9b8f8b0be6ae1698b6072b17a74c68955b2d4b3a00c70339d8c156a02cd5fbf5750e70b185b5b373f89fcea57fcb518375044cabe3df531f99f4d83a8fe67bd
|
|
7
|
+
data.tar.gz: bfe35936492b4ba9e3faf035ce6cf6740834edb704cfdfadb914c56bf8a9ba25d647a9aa6a9a74771565d3aac16f83f64499db8cbd3d0c3c57997f96c87e082e
|
data/Gemfile.lock
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
log_sanity (2.
|
|
5
|
-
rails (>= 7.1.2, < 8.
|
|
4
|
+
log_sanity (2.4.0)
|
|
5
|
+
rails (>= 7.1.2, < 8.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
action_text-trix (2.1.15)
|
|
11
|
+
railties
|
|
12
|
+
actioncable (8.1.1)
|
|
13
|
+
actionpack (= 8.1.1)
|
|
14
|
+
activesupport (= 8.1.1)
|
|
13
15
|
nio4r (~> 2.0)
|
|
14
16
|
websocket-driver (>= 0.6.1)
|
|
15
17
|
zeitwerk (~> 2.6)
|
|
16
|
-
actionmailbox (8.
|
|
17
|
-
actionpack (= 8.
|
|
18
|
-
activejob (= 8.
|
|
19
|
-
activerecord (= 8.
|
|
20
|
-
activestorage (= 8.
|
|
21
|
-
activesupport (= 8.
|
|
18
|
+
actionmailbox (8.1.1)
|
|
19
|
+
actionpack (= 8.1.1)
|
|
20
|
+
activejob (= 8.1.1)
|
|
21
|
+
activerecord (= 8.1.1)
|
|
22
|
+
activestorage (= 8.1.1)
|
|
23
|
+
activesupport (= 8.1.1)
|
|
22
24
|
mail (>= 2.8.0)
|
|
23
|
-
actionmailer (8.
|
|
24
|
-
actionpack (= 8.
|
|
25
|
-
actionview (= 8.
|
|
26
|
-
activejob (= 8.
|
|
27
|
-
activesupport (= 8.
|
|
25
|
+
actionmailer (8.1.1)
|
|
26
|
+
actionpack (= 8.1.1)
|
|
27
|
+
actionview (= 8.1.1)
|
|
28
|
+
activejob (= 8.1.1)
|
|
29
|
+
activesupport (= 8.1.1)
|
|
28
30
|
mail (>= 2.8.0)
|
|
29
31
|
rails-dom-testing (~> 2.2)
|
|
30
|
-
actionpack (8.
|
|
31
|
-
actionview (= 8.
|
|
32
|
-
activesupport (= 8.
|
|
32
|
+
actionpack (8.1.1)
|
|
33
|
+
actionview (= 8.1.1)
|
|
34
|
+
activesupport (= 8.1.1)
|
|
33
35
|
nokogiri (>= 1.8.5)
|
|
34
36
|
rack (>= 2.2.4)
|
|
35
37
|
rack-session (>= 1.0.1)
|
|
@@ -37,151 +39,168 @@ GEM
|
|
|
37
39
|
rails-dom-testing (~> 2.2)
|
|
38
40
|
rails-html-sanitizer (~> 1.6)
|
|
39
41
|
useragent (~> 0.16)
|
|
40
|
-
actiontext (8.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
actiontext (8.1.1)
|
|
43
|
+
action_text-trix (~> 2.1.15)
|
|
44
|
+
actionpack (= 8.1.1)
|
|
45
|
+
activerecord (= 8.1.1)
|
|
46
|
+
activestorage (= 8.1.1)
|
|
47
|
+
activesupport (= 8.1.1)
|
|
45
48
|
globalid (>= 0.6.0)
|
|
46
49
|
nokogiri (>= 1.8.5)
|
|
47
|
-
actionview (8.
|
|
48
|
-
activesupport (= 8.
|
|
50
|
+
actionview (8.1.1)
|
|
51
|
+
activesupport (= 8.1.1)
|
|
49
52
|
builder (~> 3.1)
|
|
50
53
|
erubi (~> 1.11)
|
|
51
54
|
rails-dom-testing (~> 2.2)
|
|
52
55
|
rails-html-sanitizer (~> 1.6)
|
|
53
|
-
activejob (8.
|
|
54
|
-
activesupport (= 8.
|
|
56
|
+
activejob (8.1.1)
|
|
57
|
+
activesupport (= 8.1.1)
|
|
55
58
|
globalid (>= 0.3.6)
|
|
56
|
-
activemodel (8.
|
|
57
|
-
activesupport (= 8.
|
|
58
|
-
activerecord (8.
|
|
59
|
-
activemodel (= 8.
|
|
60
|
-
activesupport (= 8.
|
|
59
|
+
activemodel (8.1.1)
|
|
60
|
+
activesupport (= 8.1.1)
|
|
61
|
+
activerecord (8.1.1)
|
|
62
|
+
activemodel (= 8.1.1)
|
|
63
|
+
activesupport (= 8.1.1)
|
|
61
64
|
timeout (>= 0.4.0)
|
|
62
|
-
activestorage (8.
|
|
63
|
-
actionpack (= 8.
|
|
64
|
-
activejob (= 8.
|
|
65
|
-
activerecord (= 8.
|
|
66
|
-
activesupport (= 8.
|
|
65
|
+
activestorage (8.1.1)
|
|
66
|
+
actionpack (= 8.1.1)
|
|
67
|
+
activejob (= 8.1.1)
|
|
68
|
+
activerecord (= 8.1.1)
|
|
69
|
+
activesupport (= 8.1.1)
|
|
67
70
|
marcel (~> 1.0)
|
|
68
|
-
activesupport (8.
|
|
71
|
+
activesupport (8.1.1)
|
|
69
72
|
base64
|
|
70
|
-
benchmark (>= 0.3)
|
|
71
73
|
bigdecimal
|
|
72
74
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
73
75
|
connection_pool (>= 2.2.5)
|
|
74
76
|
drb
|
|
75
77
|
i18n (>= 1.6, < 2)
|
|
78
|
+
json
|
|
76
79
|
logger (>= 1.4.2)
|
|
77
80
|
minitest (>= 5.1)
|
|
78
81
|
securerandom (>= 0.3)
|
|
79
82
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
80
83
|
uri (>= 0.13.1)
|
|
81
|
-
base64 (0.
|
|
82
|
-
|
|
83
|
-
bigdecimal (3.1.8)
|
|
84
|
+
base64 (0.3.0)
|
|
85
|
+
bigdecimal (3.3.1)
|
|
84
86
|
builder (3.3.0)
|
|
85
|
-
concurrent-ruby (1.3.
|
|
86
|
-
connection_pool (
|
|
87
|
+
concurrent-ruby (1.3.6)
|
|
88
|
+
connection_pool (3.0.2)
|
|
87
89
|
crass (1.0.6)
|
|
88
|
-
date (3.
|
|
89
|
-
drb (2.2.
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
date (3.5.1)
|
|
91
|
+
drb (2.2.3)
|
|
92
|
+
erb (6.0.0)
|
|
93
|
+
erubi (1.13.1)
|
|
94
|
+
globalid (1.3.0)
|
|
92
95
|
activesupport (>= 6.1)
|
|
93
|
-
i18n (1.14.
|
|
96
|
+
i18n (1.14.7)
|
|
94
97
|
concurrent-ruby (~> 1.0)
|
|
95
|
-
io-console (0.
|
|
96
|
-
irb (1.
|
|
98
|
+
io-console (0.8.1)
|
|
99
|
+
irb (1.15.3)
|
|
100
|
+
pp (>= 0.6.0)
|
|
97
101
|
rdoc (>= 4.0.0)
|
|
98
102
|
reline (>= 0.4.2)
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
json (2.18.0)
|
|
104
|
+
logger (1.7.0)
|
|
105
|
+
loofah (2.24.1)
|
|
101
106
|
crass (~> 1.0.2)
|
|
102
107
|
nokogiri (>= 1.12.0)
|
|
103
|
-
mail (2.
|
|
108
|
+
mail (2.9.0)
|
|
109
|
+
logger
|
|
104
110
|
mini_mime (>= 0.1.1)
|
|
105
111
|
net-imap
|
|
106
112
|
net-pop
|
|
107
113
|
net-smtp
|
|
108
|
-
marcel (1.0
|
|
114
|
+
marcel (1.1.0)
|
|
109
115
|
mini_mime (1.1.5)
|
|
110
|
-
minitest (5.
|
|
111
|
-
net-imap (0.5.
|
|
116
|
+
minitest (5.27.0)
|
|
117
|
+
net-imap (0.5.12)
|
|
112
118
|
date
|
|
113
119
|
net-protocol
|
|
114
120
|
net-pop (0.1.2)
|
|
115
121
|
net-protocol
|
|
116
122
|
net-protocol (0.2.2)
|
|
117
123
|
timeout
|
|
118
|
-
net-smtp (0.5.
|
|
124
|
+
net-smtp (0.5.1)
|
|
119
125
|
net-protocol
|
|
120
|
-
nio4r (2.7.
|
|
121
|
-
nokogiri (1.
|
|
126
|
+
nio4r (2.7.5)
|
|
127
|
+
nokogiri (1.18.10-aarch64-linux-gnu)
|
|
122
128
|
racc (~> 1.4)
|
|
123
|
-
nokogiri (1.
|
|
129
|
+
nokogiri (1.18.10-arm64-darwin)
|
|
124
130
|
racc (~> 1.4)
|
|
125
|
-
nokogiri (1.
|
|
131
|
+
nokogiri (1.18.10-x86_64-darwin)
|
|
126
132
|
racc (~> 1.4)
|
|
127
|
-
|
|
133
|
+
nokogiri (1.18.10-x86_64-linux-gnu)
|
|
134
|
+
racc (~> 1.4)
|
|
135
|
+
pp (0.6.3)
|
|
136
|
+
prettyprint
|
|
137
|
+
prettyprint (0.2.0)
|
|
138
|
+
psych (5.3.0)
|
|
139
|
+
date
|
|
128
140
|
stringio
|
|
129
141
|
racc (1.8.1)
|
|
130
|
-
rack (3.
|
|
131
|
-
rack-session (2.
|
|
142
|
+
rack (3.2.4)
|
|
143
|
+
rack-session (2.1.1)
|
|
144
|
+
base64 (>= 0.1.0)
|
|
132
145
|
rack (>= 3.0.0)
|
|
133
|
-
rack-test (2.
|
|
146
|
+
rack-test (2.2.0)
|
|
134
147
|
rack (>= 1.3)
|
|
135
|
-
rackup (2.
|
|
148
|
+
rackup (2.3.1)
|
|
136
149
|
rack (>= 3)
|
|
137
|
-
rails (8.
|
|
138
|
-
actioncable (= 8.
|
|
139
|
-
actionmailbox (= 8.
|
|
140
|
-
actionmailer (= 8.
|
|
141
|
-
actionpack (= 8.
|
|
142
|
-
actiontext (= 8.
|
|
143
|
-
actionview (= 8.
|
|
144
|
-
activejob (= 8.
|
|
145
|
-
activemodel (= 8.
|
|
146
|
-
activerecord (= 8.
|
|
147
|
-
activestorage (= 8.
|
|
148
|
-
activesupport (= 8.
|
|
150
|
+
rails (8.1.1)
|
|
151
|
+
actioncable (= 8.1.1)
|
|
152
|
+
actionmailbox (= 8.1.1)
|
|
153
|
+
actionmailer (= 8.1.1)
|
|
154
|
+
actionpack (= 8.1.1)
|
|
155
|
+
actiontext (= 8.1.1)
|
|
156
|
+
actionview (= 8.1.1)
|
|
157
|
+
activejob (= 8.1.1)
|
|
158
|
+
activemodel (= 8.1.1)
|
|
159
|
+
activerecord (= 8.1.1)
|
|
160
|
+
activestorage (= 8.1.1)
|
|
161
|
+
activesupport (= 8.1.1)
|
|
149
162
|
bundler (>= 1.15.0)
|
|
150
|
-
railties (= 8.
|
|
151
|
-
rails-dom-testing (2.
|
|
163
|
+
railties (= 8.1.1)
|
|
164
|
+
rails-dom-testing (2.3.0)
|
|
152
165
|
activesupport (>= 5.0.0)
|
|
153
166
|
minitest
|
|
154
167
|
nokogiri (>= 1.6)
|
|
155
|
-
rails-html-sanitizer (1.6.
|
|
168
|
+
rails-html-sanitizer (1.6.2)
|
|
156
169
|
loofah (~> 2.21)
|
|
157
|
-
nokogiri (
|
|
158
|
-
railties (8.
|
|
159
|
-
actionpack (= 8.
|
|
160
|
-
activesupport (= 8.
|
|
170
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
171
|
+
railties (8.1.1)
|
|
172
|
+
actionpack (= 8.1.1)
|
|
173
|
+
activesupport (= 8.1.1)
|
|
161
174
|
irb (~> 1.13)
|
|
162
175
|
rackup (>= 1.0.0)
|
|
163
176
|
rake (>= 12.2)
|
|
164
177
|
thor (~> 1.0, >= 1.2.2)
|
|
178
|
+
tsort (>= 0.2)
|
|
165
179
|
zeitwerk (~> 2.6)
|
|
166
|
-
rake (13.
|
|
167
|
-
rdoc (6.
|
|
180
|
+
rake (13.3.1)
|
|
181
|
+
rdoc (6.17.0)
|
|
182
|
+
erb
|
|
168
183
|
psych (>= 4.0.0)
|
|
169
|
-
|
|
184
|
+
tsort
|
|
185
|
+
reline (0.6.3)
|
|
170
186
|
io-console (~> 0.5)
|
|
171
|
-
securerandom (0.
|
|
172
|
-
stringio (3.1.
|
|
173
|
-
thor (1.
|
|
174
|
-
timeout (0.
|
|
187
|
+
securerandom (0.4.1)
|
|
188
|
+
stringio (3.1.9)
|
|
189
|
+
thor (1.4.0)
|
|
190
|
+
timeout (0.5.0)
|
|
191
|
+
tsort (0.2.0)
|
|
175
192
|
tzinfo (2.0.6)
|
|
176
193
|
concurrent-ruby (~> 1.0)
|
|
177
|
-
uri (1.
|
|
178
|
-
useragent (0.16.
|
|
179
|
-
websocket-driver (0.
|
|
194
|
+
uri (1.1.1)
|
|
195
|
+
useragent (0.16.11)
|
|
196
|
+
websocket-driver (0.8.0)
|
|
197
|
+
base64
|
|
180
198
|
websocket-extensions (>= 0.1.0)
|
|
181
199
|
websocket-extensions (0.1.5)
|
|
182
|
-
zeitwerk (2.7.
|
|
200
|
+
zeitwerk (2.7.3)
|
|
183
201
|
|
|
184
202
|
PLATFORMS
|
|
203
|
+
aarch64-linux
|
|
185
204
|
arm64-darwin
|
|
186
205
|
x86_64-darwin
|
|
187
206
|
x86_64-linux
|
|
@@ -190,4 +209,4 @@ DEPENDENCIES
|
|
|
190
209
|
log_sanity!
|
|
191
210
|
|
|
192
211
|
BUNDLED WITH
|
|
193
|
-
2.
|
|
212
|
+
2.6.9
|
data/LICENSE
CHANGED
|
@@ -9,10 +9,10 @@ module LogSanity
|
|
|
9
9
|
format = payload[:format]
|
|
10
10
|
|
|
11
11
|
# log 'method', payload[:method]
|
|
12
|
-
# log 'path', payload[:path]
|
|
12
|
+
# log 'path', payload[:path] # includes unfiltered qparams
|
|
13
13
|
# log 'controller', payload[:controller]
|
|
14
14
|
# log 'action', payload[:action]
|
|
15
|
-
log 'route', "#{payload[:controller]}##{payload[:action]}"
|
|
15
|
+
log 'route', "#{payload[:controller]}##{payload[:action]}" if payload[:controller]
|
|
16
16
|
log 'format', format
|
|
17
17
|
log 'params', params if params.present?
|
|
18
18
|
|
|
@@ -15,16 +15,22 @@ module LogSanity
|
|
|
15
15
|
'event' => "#{request.scheme}_#{method.downcase}",
|
|
16
16
|
'ip' => request.remote_ip,
|
|
17
17
|
'rq' => request.uuid,
|
|
18
|
-
# '
|
|
19
|
-
# 'path' => request.filtered_path,
|
|
18
|
+
# 'path' => request.path, # path only
|
|
19
|
+
# 'path' => request.filtered_path, # path + params
|
|
20
|
+
# 'params' => request.filtered_parameters,
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
unless fields['route']
|
|
24
|
+
unless fields['path']
|
|
25
|
+
# most errors repopulate path, so look for the original one first.
|
|
26
|
+
# original_path is, however, unfiltered.
|
|
27
|
+
f2['path'] = request.filtered_env['action_dispatch.original_path']
|
|
28
|
+
f2['path'] ||= request.path
|
|
29
|
+
end
|
|
30
|
+
if !fields['params'] && p2 = request.filtered_parameters.presence
|
|
31
|
+
f2['params'] = p2
|
|
32
|
+
end
|
|
33
|
+
end
|
|
28
34
|
|
|
29
35
|
fields['duration'] ||= {}
|
|
30
36
|
fields['duration']['total'] = event.duration.round
|
data/lib/log_sanity/version.rb
CHANGED
data/log_sanity.gemspec
CHANGED
|
@@ -2,20 +2,20 @@ lib = File.expand_path('../lib', __FILE__)
|
|
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
require 'log_sanity/version'
|
|
4
4
|
|
|
5
|
-
Gem::Specification.new do |
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "log_sanity"
|
|
7
|
+
spec.version = LogSanity::VERSION
|
|
8
|
+
spec.authors = ["thomas morgan"]
|
|
9
|
+
spec.email = ["tm@iprog.com"]
|
|
10
|
+
spec.homepage = 'https://github.com/zarqman/log_sanity'
|
|
11
|
+
spec.summary = 'LogSanity - Bring sanity to Rails logs'
|
|
12
|
+
spec.description = 'LogSanity - Bring sanity to Rails logs by reducing verbosity, using json output, and more.'
|
|
13
|
+
spec.license = 'MIT'
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
spec.files = `git ls-files`.split($/)
|
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
18
|
+
spec.require_paths = ["lib"]
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
spec.add_dependency 'rails', '>= 7.1.2', '< 8.2'
|
|
21
21
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: log_sanity
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thomas morgan
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rails
|
|
@@ -19,7 +18,7 @@ dependencies:
|
|
|
19
18
|
version: 7.1.2
|
|
20
19
|
- - "<"
|
|
21
20
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '8.
|
|
21
|
+
version: '8.2'
|
|
23
22
|
type: :runtime
|
|
24
23
|
prerelease: false
|
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -29,7 +28,7 @@ dependencies:
|
|
|
29
28
|
version: 7.1.2
|
|
30
29
|
- - "<"
|
|
31
30
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '8.
|
|
31
|
+
version: '8.2'
|
|
33
32
|
description: LogSanity - Bring sanity to Rails logs by reducing verbosity, using json
|
|
34
33
|
output, and more.
|
|
35
34
|
email:
|
|
@@ -106,7 +105,6 @@ homepage: https://github.com/zarqman/log_sanity
|
|
|
106
105
|
licenses:
|
|
107
106
|
- MIT
|
|
108
107
|
metadata: {}
|
|
109
|
-
post_install_message:
|
|
110
108
|
rdoc_options: []
|
|
111
109
|
require_paths:
|
|
112
110
|
- lib
|
|
@@ -121,8 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
121
119
|
- !ruby/object:Gem::Version
|
|
122
120
|
version: '0'
|
|
123
121
|
requirements: []
|
|
124
|
-
rubygems_version: 3.
|
|
125
|
-
signing_key:
|
|
122
|
+
rubygems_version: 3.6.9
|
|
126
123
|
specification_version: 4
|
|
127
124
|
summary: LogSanity - Bring sanity to Rails logs
|
|
128
125
|
test_files:
|