log_sanity 2.3.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5aef8673af0d3e5798277db9206a7f7fef07b78f1980b0386db443216b8aec5
4
- data.tar.gz: 174e8ebe69d69028a9fcc8fc6862687db14399658c8f4b4948a4a07f8e9c2bec
3
+ metadata.gz: 4fefbc5ff00cc5187c607a0cb5521821be7e73ff8cba488a55e604b77f817715
4
+ data.tar.gz: 64ac53ae8c117cc57009c791f7c0b4c9050658ce52581a95fda611ca2221d14a
5
5
  SHA512:
6
- metadata.gz: ce7eb35d43a8cffe37681cd566e395d0e603d6cd1b8f0c464f21cd1592c4d00599e12ece75b99feebbf2b03a29533135bc8d203ca82ca079e8fcc77f2d8d253d
7
- data.tar.gz: fd70029d7df690721689898dfd8546f935f2ce1597abc0ecbb5c93066e3d7474e1fef1081ef81356ccfcd997486067b162f1decc117856fb4ad82ee5cce2b76c
6
+ metadata.gz: d9b8f8b0be6ae1698b6072b17a74c68955b2d4b3a00c70339d8c156a02cd5fbf5750e70b185b5b373f89fcea57fcb518375044cabe3df531f99f4d83a8fe67bd
7
+ data.tar.gz: bfe35936492b4ba9e3faf035ce6cf6740834edb704cfdfadb914c56bf8a9ba25d647a9aa6a9a74771565d3aac16f83f64499db8cbd3d0c3c57997f96c87e082e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- log_sanity (2.3.1)
4
+ log_sanity (2.4.0)
5
5
  rails (>= 7.1.2, < 8.2)
6
6
 
7
7
  GEM
@@ -9,29 +9,29 @@ GEM
9
9
  specs:
10
10
  action_text-trix (2.1.15)
11
11
  railties
12
- actioncable (8.1.0)
13
- actionpack (= 8.1.0)
14
- activesupport (= 8.1.0)
12
+ actioncable (8.1.1)
13
+ actionpack (= 8.1.1)
14
+ activesupport (= 8.1.1)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
17
  zeitwerk (~> 2.6)
18
- actionmailbox (8.1.0)
19
- actionpack (= 8.1.0)
20
- activejob (= 8.1.0)
21
- activerecord (= 8.1.0)
22
- activestorage (= 8.1.0)
23
- activesupport (= 8.1.0)
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)
24
24
  mail (>= 2.8.0)
25
- actionmailer (8.1.0)
26
- actionpack (= 8.1.0)
27
- actionview (= 8.1.0)
28
- activejob (= 8.1.0)
29
- activesupport (= 8.1.0)
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)
30
30
  mail (>= 2.8.0)
31
31
  rails-dom-testing (~> 2.2)
32
- actionpack (8.1.0)
33
- actionview (= 8.1.0)
34
- activesupport (= 8.1.0)
32
+ actionpack (8.1.1)
33
+ actionview (= 8.1.1)
34
+ activesupport (= 8.1.1)
35
35
  nokogiri (>= 1.8.5)
36
36
  rack (>= 2.2.4)
37
37
  rack-session (>= 1.0.1)
@@ -39,36 +39,36 @@ GEM
39
39
  rails-dom-testing (~> 2.2)
40
40
  rails-html-sanitizer (~> 1.6)
41
41
  useragent (~> 0.16)
42
- actiontext (8.1.0)
42
+ actiontext (8.1.1)
43
43
  action_text-trix (~> 2.1.15)
44
- actionpack (= 8.1.0)
45
- activerecord (= 8.1.0)
46
- activestorage (= 8.1.0)
47
- activesupport (= 8.1.0)
44
+ actionpack (= 8.1.1)
45
+ activerecord (= 8.1.1)
46
+ activestorage (= 8.1.1)
47
+ activesupport (= 8.1.1)
48
48
  globalid (>= 0.6.0)
49
49
  nokogiri (>= 1.8.5)
50
- actionview (8.1.0)
51
- activesupport (= 8.1.0)
50
+ actionview (8.1.1)
51
+ activesupport (= 8.1.1)
52
52
  builder (~> 3.1)
53
53
  erubi (~> 1.11)
54
54
  rails-dom-testing (~> 2.2)
55
55
  rails-html-sanitizer (~> 1.6)
56
- activejob (8.1.0)
57
- activesupport (= 8.1.0)
56
+ activejob (8.1.1)
57
+ activesupport (= 8.1.1)
58
58
  globalid (>= 0.3.6)
59
- activemodel (8.1.0)
60
- activesupport (= 8.1.0)
61
- activerecord (8.1.0)
62
- activemodel (= 8.1.0)
63
- activesupport (= 8.1.0)
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)
64
64
  timeout (>= 0.4.0)
65
- activestorage (8.1.0)
66
- actionpack (= 8.1.0)
67
- activejob (= 8.1.0)
68
- activerecord (= 8.1.0)
69
- activesupport (= 8.1.0)
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)
70
70
  marcel (~> 1.0)
71
- activesupport (8.1.0)
71
+ activesupport (8.1.1)
72
72
  base64
73
73
  bigdecimal
74
74
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -84,23 +84,23 @@ GEM
84
84
  base64 (0.3.0)
85
85
  bigdecimal (3.3.1)
86
86
  builder (3.3.0)
87
- concurrent-ruby (1.3.5)
88
- connection_pool (2.5.4)
87
+ concurrent-ruby (1.3.6)
88
+ connection_pool (3.0.2)
89
89
  crass (1.0.6)
90
- date (3.4.1)
90
+ date (3.5.1)
91
91
  drb (2.2.3)
92
- erb (5.1.1)
92
+ erb (6.0.0)
93
93
  erubi (1.13.1)
94
94
  globalid (1.3.0)
95
95
  activesupport (>= 6.1)
96
96
  i18n (1.14.7)
97
97
  concurrent-ruby (~> 1.0)
98
98
  io-console (0.8.1)
99
- irb (1.15.2)
99
+ irb (1.15.3)
100
100
  pp (>= 0.6.0)
101
101
  rdoc (>= 4.0.0)
102
102
  reline (>= 0.4.2)
103
- json (2.15.1)
103
+ json (2.18.0)
104
104
  logger (1.7.0)
105
105
  loofah (2.24.1)
106
106
  crass (~> 1.0.2)
@@ -113,7 +113,7 @@ GEM
113
113
  net-smtp
114
114
  marcel (1.1.0)
115
115
  mini_mime (1.1.5)
116
- minitest (5.26.0)
116
+ minitest (5.27.0)
117
117
  net-imap (0.5.12)
118
118
  date
119
119
  net-protocol
@@ -123,7 +123,7 @@ GEM
123
123
  timeout
124
124
  net-smtp (0.5.1)
125
125
  net-protocol
126
- nio4r (2.7.4)
126
+ nio4r (2.7.5)
127
127
  nokogiri (1.18.10-aarch64-linux-gnu)
128
128
  racc (~> 1.4)
129
129
  nokogiri (1.18.10-arm64-darwin)
@@ -135,32 +135,32 @@ GEM
135
135
  pp (0.6.3)
136
136
  prettyprint
137
137
  prettyprint (0.2.0)
138
- psych (5.2.6)
138
+ psych (5.3.0)
139
139
  date
140
140
  stringio
141
141
  racc (1.8.1)
142
- rack (3.2.3)
142
+ rack (3.2.4)
143
143
  rack-session (2.1.1)
144
144
  base64 (>= 0.1.0)
145
145
  rack (>= 3.0.0)
146
146
  rack-test (2.2.0)
147
147
  rack (>= 1.3)
148
- rackup (2.2.1)
148
+ rackup (2.3.1)
149
149
  rack (>= 3)
150
- rails (8.1.0)
151
- actioncable (= 8.1.0)
152
- actionmailbox (= 8.1.0)
153
- actionmailer (= 8.1.0)
154
- actionpack (= 8.1.0)
155
- actiontext (= 8.1.0)
156
- actionview (= 8.1.0)
157
- activejob (= 8.1.0)
158
- activemodel (= 8.1.0)
159
- activerecord (= 8.1.0)
160
- activestorage (= 8.1.0)
161
- activesupport (= 8.1.0)
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)
162
162
  bundler (>= 1.15.0)
163
- railties (= 8.1.0)
163
+ railties (= 8.1.1)
164
164
  rails-dom-testing (2.3.0)
165
165
  activesupport (>= 5.0.0)
166
166
  minitest
@@ -168,30 +168,30 @@ GEM
168
168
  rails-html-sanitizer (1.6.2)
169
169
  loofah (~> 2.21)
170
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.0)
172
- actionpack (= 8.1.0)
173
- activesupport (= 8.1.0)
171
+ railties (8.1.1)
172
+ actionpack (= 8.1.1)
173
+ activesupport (= 8.1.1)
174
174
  irb (~> 1.13)
175
175
  rackup (>= 1.0.0)
176
176
  rake (>= 12.2)
177
177
  thor (~> 1.0, >= 1.2.2)
178
178
  tsort (>= 0.2)
179
179
  zeitwerk (~> 2.6)
180
- rake (13.3.0)
181
- rdoc (6.15.0)
180
+ rake (13.3.1)
181
+ rdoc (6.17.0)
182
182
  erb
183
183
  psych (>= 4.0.0)
184
184
  tsort
185
- reline (0.6.2)
185
+ reline (0.6.3)
186
186
  io-console (~> 0.5)
187
187
  securerandom (0.4.1)
188
- stringio (3.1.7)
188
+ stringio (3.1.9)
189
189
  thor (1.4.0)
190
- timeout (0.4.3)
190
+ timeout (0.5.0)
191
191
  tsort (0.2.0)
192
192
  tzinfo (2.0.6)
193
193
  concurrent-ruby (~> 1.0)
194
- uri (1.0.4)
194
+ uri (1.1.1)
195
195
  useragent (0.16.11)
196
196
  websocket-driver (0.8.0)
197
197
  base64
@@ -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
- # 'params' => request.filtered_params,
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
- # unless fields['route']
23
- # # most errors repopulate path, so look for the original one first.
24
- # # original_path is, however, unfiltered.
25
- # fields['path'] = payload[:env]['action_dispatch.original_path']
26
- # fields['path'] ||= request.filtered_path
27
- # end
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
@@ -1,3 +1,3 @@
1
1
  module LogSanity
2
- VERSION = '2.3.1'
2
+ VERSION = '2.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_sanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan