log_sanity 2.1.1 → 2.1.2

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: 2aad47580de71bc5f808b70557881ed7134404f150e8b8c7893f33c3ef660327
4
- data.tar.gz: 3cba5122b91fa6163d3d9e5e8b6cb537a577136e670ace442c30297a8ddd8a50
3
+ metadata.gz: 3c28332ecf2daf12ad4b7f43fe6e322b22db9d3988d6a386a863bcfb23079c72
4
+ data.tar.gz: '0789db0e2dee84e0248a950e999a1d48dfc4aea1f9650ae45b873ddf4982ba57'
5
5
  SHA512:
6
- metadata.gz: 1112c2fdc532170c33d4288806f369f077ccc1f627345bbdb5d593a051480cd5417d875c475c545096261ec095e3d1c89ab9fe25174c1ae02c9f94e1f0f96d27
7
- data.tar.gz: f653ecf13c53ed5b8a5a3a44af7353461488a6bc6c5cac9060fcc692d5c0ceb9528b1547054dfa8285e91f369bce1281e081cc6a0961cc45a36fa33773d9cec2
6
+ metadata.gz: 56788f3c81a6337cecaf2a710bc41cf8c9430b5f57ce4ae5483b296b3ab9059ab574c0b089eb338cf91333379ecce4418d86c4836eed87bd5b7823511cd17b78
7
+ data.tar.gz: a05e761fb82ef26f6c02a3d1e99ada217a275f171ea2fa8317e84a0d2c6f26f0e42e185192433a412520394e7d2eb747c26f96c4711d97996058111bb453dc66
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### 2.1.2
2
+
3
+ - In ActiveJob logs, output gid:// when available instead of using .to_json
4
+
1
5
  #### 2.1.1
2
6
 
3
7
  - Report correct request method when Rails handles an exception
data/Gemfile.lock CHANGED
@@ -1,41 +1,41 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- log_sanity (2.1.1)
4
+ log_sanity (2.1.2)
5
5
  rails (>= 7.1.2, < 7.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (7.1.2)
11
- actionpack (= 7.1.2)
12
- activesupport (= 7.1.2)
10
+ actioncable (7.1.3.2)
11
+ actionpack (= 7.1.3.2)
12
+ activesupport (= 7.1.3.2)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
15
  zeitwerk (~> 2.6)
16
- actionmailbox (7.1.2)
17
- actionpack (= 7.1.2)
18
- activejob (= 7.1.2)
19
- activerecord (= 7.1.2)
20
- activestorage (= 7.1.2)
21
- activesupport (= 7.1.2)
16
+ actionmailbox (7.1.3.2)
17
+ actionpack (= 7.1.3.2)
18
+ activejob (= 7.1.3.2)
19
+ activerecord (= 7.1.3.2)
20
+ activestorage (= 7.1.3.2)
21
+ activesupport (= 7.1.3.2)
22
22
  mail (>= 2.7.1)
23
23
  net-imap
24
24
  net-pop
25
25
  net-smtp
26
- actionmailer (7.1.2)
27
- actionpack (= 7.1.2)
28
- actionview (= 7.1.2)
29
- activejob (= 7.1.2)
30
- activesupport (= 7.1.2)
26
+ actionmailer (7.1.3.2)
27
+ actionpack (= 7.1.3.2)
28
+ actionview (= 7.1.3.2)
29
+ activejob (= 7.1.3.2)
30
+ activesupport (= 7.1.3.2)
31
31
  mail (~> 2.5, >= 2.5.4)
32
32
  net-imap
33
33
  net-pop
34
34
  net-smtp
35
35
  rails-dom-testing (~> 2.2)
36
- actionpack (7.1.2)
37
- actionview (= 7.1.2)
38
- activesupport (= 7.1.2)
36
+ actionpack (7.1.3.2)
37
+ actionview (= 7.1.3.2)
38
+ activesupport (= 7.1.3.2)
39
39
  nokogiri (>= 1.8.5)
40
40
  racc
41
41
  rack (>= 2.2.4)
@@ -43,35 +43,35 @@ GEM
43
43
  rack-test (>= 0.6.3)
44
44
  rails-dom-testing (~> 2.2)
45
45
  rails-html-sanitizer (~> 1.6)
46
- actiontext (7.1.2)
47
- actionpack (= 7.1.2)
48
- activerecord (= 7.1.2)
49
- activestorage (= 7.1.2)
50
- activesupport (= 7.1.2)
46
+ actiontext (7.1.3.2)
47
+ actionpack (= 7.1.3.2)
48
+ activerecord (= 7.1.3.2)
49
+ activestorage (= 7.1.3.2)
50
+ activesupport (= 7.1.3.2)
51
51
  globalid (>= 0.6.0)
52
52
  nokogiri (>= 1.8.5)
53
- actionview (7.1.2)
54
- activesupport (= 7.1.2)
53
+ actionview (7.1.3.2)
54
+ activesupport (= 7.1.3.2)
55
55
  builder (~> 3.1)
56
56
  erubi (~> 1.11)
57
57
  rails-dom-testing (~> 2.2)
58
58
  rails-html-sanitizer (~> 1.6)
59
- activejob (7.1.2)
60
- activesupport (= 7.1.2)
59
+ activejob (7.1.3.2)
60
+ activesupport (= 7.1.3.2)
61
61
  globalid (>= 0.3.6)
62
- activemodel (7.1.2)
63
- activesupport (= 7.1.2)
64
- activerecord (7.1.2)
65
- activemodel (= 7.1.2)
66
- activesupport (= 7.1.2)
62
+ activemodel (7.1.3.2)
63
+ activesupport (= 7.1.3.2)
64
+ activerecord (7.1.3.2)
65
+ activemodel (= 7.1.3.2)
66
+ activesupport (= 7.1.3.2)
67
67
  timeout (>= 0.4.0)
68
- activestorage (7.1.2)
69
- actionpack (= 7.1.2)
70
- activejob (= 7.1.2)
71
- activerecord (= 7.1.2)
72
- activesupport (= 7.1.2)
68
+ activestorage (7.1.3.2)
69
+ actionpack (= 7.1.3.2)
70
+ activejob (= 7.1.3.2)
71
+ activerecord (= 7.1.3.2)
72
+ activesupport (= 7.1.3.2)
73
73
  marcel (~> 1.0)
74
- activesupport (7.1.2)
74
+ activesupport (7.1.3.2)
75
75
  base64
76
76
  bigdecimal
77
77
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -82,23 +82,22 @@ GEM
82
82
  mutex_m
83
83
  tzinfo (~> 2.0)
84
84
  base64 (0.2.0)
85
- bigdecimal (3.1.4)
85
+ bigdecimal (3.1.7)
86
86
  builder (3.2.4)
87
- concurrent-ruby (1.2.2)
87
+ concurrent-ruby (1.2.3)
88
88
  connection_pool (2.4.1)
89
89
  crass (1.0.6)
90
90
  date (3.3.4)
91
- drb (2.2.0)
92
- ruby2_keywords
91
+ drb (2.2.1)
93
92
  erubi (1.12.0)
94
93
  globalid (1.2.1)
95
94
  activesupport (>= 6.1)
96
- i18n (1.14.1)
95
+ i18n (1.14.4)
97
96
  concurrent-ruby (~> 1.0)
98
- io-console (0.6.0)
99
- irb (1.9.1)
100
- rdoc
101
- reline (>= 0.3.8)
97
+ io-console (0.7.2)
98
+ irb (1.13.0)
99
+ rdoc (>= 4.0.0)
100
+ reline (>= 0.4.2)
102
101
  loofah (2.22.0)
103
102
  crass (~> 1.0.2)
104
103
  nokogiri (>= 1.12.0)
@@ -107,30 +106,30 @@ GEM
107
106
  net-imap
108
107
  net-pop
109
108
  net-smtp
110
- marcel (1.0.2)
109
+ marcel (1.0.4)
111
110
  mini_mime (1.1.5)
112
- minitest (5.20.0)
111
+ minitest (5.22.3)
113
112
  mutex_m (0.2.0)
114
- net-imap (0.4.6)
113
+ net-imap (0.4.10)
115
114
  date
116
115
  net-protocol
117
116
  net-pop (0.1.2)
118
117
  net-protocol
119
118
  net-protocol (0.2.2)
120
119
  timeout
121
- net-smtp (0.4.0)
120
+ net-smtp (0.5.0)
122
121
  net-protocol
123
- nio4r (2.6.1)
124
- nokogiri (1.15.5-arm64-darwin)
122
+ nio4r (2.7.1)
123
+ nokogiri (1.16.4-arm64-darwin)
125
124
  racc (~> 1.4)
126
- nokogiri (1.15.5-x86_64-darwin)
125
+ nokogiri (1.16.4-x86_64-darwin)
127
126
  racc (~> 1.4)
128
- nokogiri (1.15.5-x86_64-linux)
127
+ nokogiri (1.16.4-x86_64-linux)
129
128
  racc (~> 1.4)
130
- psych (5.1.1.1)
129
+ psych (5.1.2)
131
130
  stringio
132
131
  racc (1.7.3)
133
- rack (3.0.8)
132
+ rack (3.0.10)
134
133
  rack-session (2.0.0)
135
134
  rack (>= 3.0.0)
136
135
  rack-test (2.1.0)
@@ -138,20 +137,20 @@ GEM
138
137
  rackup (2.1.0)
139
138
  rack (>= 3)
140
139
  webrick (~> 1.8)
141
- rails (7.1.2)
142
- actioncable (= 7.1.2)
143
- actionmailbox (= 7.1.2)
144
- actionmailer (= 7.1.2)
145
- actionpack (= 7.1.2)
146
- actiontext (= 7.1.2)
147
- actionview (= 7.1.2)
148
- activejob (= 7.1.2)
149
- activemodel (= 7.1.2)
150
- activerecord (= 7.1.2)
151
- activestorage (= 7.1.2)
152
- activesupport (= 7.1.2)
140
+ rails (7.1.3.2)
141
+ actioncable (= 7.1.3.2)
142
+ actionmailbox (= 7.1.3.2)
143
+ actionmailer (= 7.1.3.2)
144
+ actionpack (= 7.1.3.2)
145
+ actiontext (= 7.1.3.2)
146
+ actionview (= 7.1.3.2)
147
+ activejob (= 7.1.3.2)
148
+ activemodel (= 7.1.3.2)
149
+ activerecord (= 7.1.3.2)
150
+ activestorage (= 7.1.3.2)
151
+ activesupport (= 7.1.3.2)
153
152
  bundler (>= 1.15.0)
154
- railties (= 7.1.2)
153
+ railties (= 7.1.3.2)
155
154
  rails-dom-testing (2.2.0)
156
155
  activesupport (>= 5.0.0)
157
156
  minitest
@@ -159,22 +158,21 @@ GEM
159
158
  rails-html-sanitizer (1.6.0)
160
159
  loofah (~> 2.21)
161
160
  nokogiri (~> 1.14)
162
- railties (7.1.2)
163
- actionpack (= 7.1.2)
164
- activesupport (= 7.1.2)
161
+ railties (7.1.3.2)
162
+ actionpack (= 7.1.3.2)
163
+ activesupport (= 7.1.3.2)
165
164
  irb
166
165
  rackup (>= 1.0.0)
167
166
  rake (>= 12.2)
168
167
  thor (~> 1.0, >= 1.2.2)
169
168
  zeitwerk (~> 2.6)
170
- rake (13.1.0)
171
- rdoc (6.6.0)
169
+ rake (13.2.1)
170
+ rdoc (6.6.3.1)
172
171
  psych (>= 4.0.0)
173
- reline (0.4.0)
172
+ reline (0.5.5)
174
173
  io-console (~> 0.5)
175
- ruby2_keywords (0.0.5)
176
- stringio (3.0.9)
177
- thor (1.3.0)
174
+ stringio (3.1.0)
175
+ thor (1.3.1)
178
176
  timeout (0.4.1)
179
177
  tzinfo (2.0.6)
180
178
  concurrent-ruby (~> 1.0)
@@ -182,7 +180,7 @@ GEM
182
180
  websocket-driver (0.7.6)
183
181
  websocket-extensions (>= 0.1.0)
184
182
  websocket-extensions (0.1.5)
185
- zeitwerk (2.6.12)
183
+ zeitwerk (2.6.13)
186
184
 
187
185
  PLATFORMS
188
186
  arm64-darwin
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2017-2023 thomas morgan
1
+ Copyright 2017-2024 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
@@ -12,7 +12,7 @@ module LogSanity
12
12
  'id' => job.job_id,
13
13
  'queue' => job.queue_name
14
14
  }
15
- e['params'] = job.arguments if job.arguments.any?
15
+ e['params'] = format_args(job.arguments) if job.arguments.any?
16
16
  if error = event.payload[:exception_object] || job.enqueue_error
17
17
  e['error'] = error
18
18
  elsif event.payload[:aborted]
@@ -33,7 +33,7 @@ module LogSanity
33
33
  'queue' => job.queue_name,
34
34
  'start_at' => job.scheduled_at
35
35
  }
36
- e['params'] = job.arguments if job.arguments.any?
36
+ e['params'] = format_args(job.arguments) if job.arguments.any?
37
37
  if error = event.payload[:exception_object] || job.enqueue_error
38
38
  e['error'] = error
39
39
  elsif event.payload[:aborted]
@@ -65,7 +65,7 @@ module LogSanity
65
65
  # 'id' => job.job_id,
66
66
  # 'queue' => job.queue_name,
67
67
  # }
68
- # e['params'] = job.arguments if job.arguments.any?
68
+ # e['params'] = format_args(job.arguments) if job.arguments.any?
69
69
  # e
70
70
  # end
71
71
  # end
@@ -81,7 +81,7 @@ module LogSanity
81
81
  'queue' => job.queue_name,
82
82
  'duration' => {'total' => event.duration.round}
83
83
  }
84
- e['params'] = job.arguments if job.arguments.any?
84
+ e['params'] = format_args(job.arguments) if job.arguments.any?
85
85
  if error = event.payload[:exception_object]
86
86
  e['error'] = error
87
87
  elsif event.payload[:aborted]
@@ -91,6 +91,22 @@ module LogSanity
91
91
  end
92
92
  end
93
93
 
94
+
95
+ private
96
+
97
+ def format_args(arg)
98
+ case arg
99
+ when Hash
100
+ arg.transform_values{|val| format_args val }
101
+ when Array
102
+ arg.map{|val| format_args val }
103
+ when GlobalID::Identification
104
+ arg.to_global_id rescue "#{arg.class}(#{arg.try(:id)})"
105
+ else
106
+ arg
107
+ end
108
+ end
109
+
94
110
  end
95
111
  end
96
112
  end
@@ -1,3 +1,3 @@
1
1
  module LogSanity
2
- VERSION = '2.1.1'
2
+ VERSION = '2.1.2'
3
3
  end
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.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-27 00:00:00.000000000 Z
11
+ date: 2024-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -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.4.10
124
+ rubygems_version: 3.5.9
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: LogSanity - Bring sanity to Rails logs