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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d613c22d31fcb596cc1e0f541fc0ad4276c15f676bb745bdb6a25bef91776ff7
4
- data.tar.gz: ae3e8726988cfb06a3abc80cb0bcab3c589a8be69734daa12ab5e292973bfd39
3
+ metadata.gz: 4fefbc5ff00cc5187c607a0cb5521821be7e73ff8cba488a55e604b77f817715
4
+ data.tar.gz: 64ac53ae8c117cc57009c791f7c0b4c9050658ce52581a95fda611ca2221d14a
5
5
  SHA512:
6
- metadata.gz: d105457230a833fe578edbdc5ba963b52cf66236341aa5f80fc634a2e9f954ec82eba63c55467bfac50fb505f732131b7312cb223e517178aa433f8fa2b2346a
7
- data.tar.gz: 59b7a90ce10d634523831e778699c4e5e56419e00db9d09979b56a50052c8332647161274a93ee8666ff0db2aa9508c5f6a53088a2334de7534cb3c0939d4594
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.3.0)
5
- rails (>= 7.1.2, < 8.1)
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
- actioncable (8.0.0)
11
- actionpack (= 8.0.0)
12
- activesupport (= 8.0.0)
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.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)
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.0.0)
24
- actionpack (= 8.0.0)
25
- actionview (= 8.0.0)
26
- activejob (= 8.0.0)
27
- activesupport (= 8.0.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)
28
30
  mail (>= 2.8.0)
29
31
  rails-dom-testing (~> 2.2)
30
- actionpack (8.0.0)
31
- actionview (= 8.0.0)
32
- activesupport (= 8.0.0)
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.0.0)
41
- actionpack (= 8.0.0)
42
- activerecord (= 8.0.0)
43
- activestorage (= 8.0.0)
44
- activesupport (= 8.0.0)
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.0.0)
48
- activesupport (= 8.0.0)
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.0.0)
54
- activesupport (= 8.0.0)
56
+ activejob (8.1.1)
57
+ activesupport (= 8.1.1)
55
58
  globalid (>= 0.3.6)
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)
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.0.0)
63
- actionpack (= 8.0.0)
64
- activejob (= 8.0.0)
65
- activerecord (= 8.0.0)
66
- activesupport (= 8.0.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)
67
70
  marcel (~> 1.0)
68
- activesupport (8.0.0)
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.2.0)
82
- benchmark (0.4.0)
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.4)
86
- connection_pool (2.4.1)
87
+ concurrent-ruby (1.3.6)
88
+ connection_pool (3.0.2)
87
89
  crass (1.0.6)
88
- date (3.4.0)
89
- drb (2.2.1)
90
- erubi (1.13.0)
91
- globalid (1.2.1)
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.6)
96
+ i18n (1.14.7)
94
97
  concurrent-ruby (~> 1.0)
95
- io-console (0.7.2)
96
- irb (1.14.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
- logger (1.6.1)
100
- loofah (2.23.1)
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.8.1)
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.4)
114
+ marcel (1.1.0)
109
115
  mini_mime (1.1.5)
110
- minitest (5.25.2)
111
- net-imap (0.5.1)
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.0)
124
+ net-smtp (0.5.1)
119
125
  net-protocol
120
- nio4r (2.7.4)
121
- nokogiri (1.16.7-arm64-darwin)
126
+ nio4r (2.7.5)
127
+ nokogiri (1.18.10-aarch64-linux-gnu)
122
128
  racc (~> 1.4)
123
- nokogiri (1.16.7-x86_64-darwin)
129
+ nokogiri (1.18.10-arm64-darwin)
124
130
  racc (~> 1.4)
125
- nokogiri (1.16.7-x86_64-linux)
131
+ nokogiri (1.18.10-x86_64-darwin)
126
132
  racc (~> 1.4)
127
- psych (5.2.0)
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.1.8)
131
- rack-session (2.0.0)
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.1.0)
146
+ rack-test (2.2.0)
134
147
  rack (>= 1.3)
135
- rackup (2.2.1)
148
+ rackup (2.3.1)
136
149
  rack (>= 3)
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)
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.0.0)
151
- rails-dom-testing (2.2.0)
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.0)
168
+ rails-html-sanitizer (1.6.2)
156
169
  loofah (~> 2.21)
157
- nokogiri (~> 1.14)
158
- railties (8.0.0)
159
- actionpack (= 8.0.0)
160
- activesupport (= 8.0.0)
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.2.1)
167
- rdoc (6.8.1)
180
+ rake (13.3.1)
181
+ rdoc (6.17.0)
182
+ erb
168
183
  psych (>= 4.0.0)
169
- reline (0.5.11)
184
+ tsort
185
+ reline (0.6.3)
170
186
  io-console (~> 0.5)
171
- securerandom (0.3.2)
172
- stringio (3.1.2)
173
- thor (1.3.2)
174
- timeout (0.4.2)
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.0.2)
178
- useragent (0.16.10)
179
- websocket-driver (0.7.6)
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.1)
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.5.22
212
+ 2.6.9
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2017-2024 thomas morgan
1
+ Copyright 2017-2025 thomas morgan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -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.0'
2
+ VERSION = '2.4.0'
3
3
  end
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 |s|
6
- s.name = "log_sanity"
7
- s.version = LogSanity::VERSION
8
- s.authors = ["thomas morgan"]
9
- s.email = ["tm@iprog.com"]
10
- s.homepage = 'https://github.com/zarqman/log_sanity'
11
- s.summary = 'LogSanity - Bring sanity to Rails logs'
12
- s.description = 'LogSanity - Bring sanity to Rails logs by reducing verbosity, using json output, and more.'
13
- s.license = 'MIT'
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
- s.files = `git ls-files`.split($/)
16
- s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
- s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
- s.require_paths = ["lib"]
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
- s.add_dependency 'rails', '>= 7.1.2', '< 8.1'
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.3.0
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: 2024-11-24 00:00:00.000000000 Z
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.1'
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.1'
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.5.22
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: