lamian 1.0.1 → 1.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 +5 -5
- data/.github/workflows/test.yml +56 -0
- data/.gitignore +10 -0
- data/.rubocop.yml +13 -0
- data/Changelog.md +55 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +278 -0
- data/LICENSE.txt +21 -0
- data/README.md +78 -0
- data/Rakefile +49 -0
- data/bin/console +8 -0
- data/bin/rake +17 -0
- data/bin/rubocop +16 -0
- data/bin/setup +8 -0
- data/lib/lamian/config.rb +4 -1
- data/lib/lamian/engine.rb +49 -11
- data/lib/lamian/logger.rb +17 -32
- data/lib/lamian/middleware.rb +1 -1
- data/lib/lamian/raven_context_extension.rb +11 -0
- data/lib/lamian/semantic_logger_appender.rb +24 -0
- data/lib/lamian/sidekiq_raven_middleware.rb +14 -0
- data/lib/lamian/sidekiq_sentry_middleware.rb +16 -0
- data/lib/lamian/version.rb +1 -1
- data/lib/lamian.rb +16 -3
- metadata +111 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d42eee8929a0bb372234198aade127f4ea73bbf7315133d2f88e6e6caff69084
|
4
|
+
data.tar.gz: f173c941c4ab3d54d54a85a6c53742bfd0dab1b7b6333920dbb0ffebdebe772e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz: '
|
6
|
+
metadata.gz: 4d6f8d04d0f95eae97dd23450507d01e49afc7bfa82ec0a4d5a35db0ab06a38595e79f41a8f60f45f500bfc9dc5f0d3bc6dff77f446ad6c8d26bc42338a044b9
|
7
|
+
data.tar.gz: '05872e41faae73675db913eff599a98ec497e2eaaa01335b5dcf8d54b3238e1a858d449667cfe415ec1ed17bafc38a88b9b1b4091e05e4c683ce2ab88b31e863'
|
@@ -0,0 +1,56 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
env:
|
6
|
+
FULL_COVERAGE_CHECK: true
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
full-check:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
# We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
|
13
|
+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/lamian'
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 3
|
20
|
+
bundler-cache: true
|
21
|
+
- name: Run Linter
|
22
|
+
run: bundle exec ci-helper RubocopLint
|
23
|
+
- name: Check missed spec suffixes
|
24
|
+
run: bundle exec ci-helper CheckSpecSuffixes --extra-paths spec/*.rb --ignored-paths spec/*_helper.rb
|
25
|
+
- name: Run specs
|
26
|
+
run: bundle exec ci-helper RunSpecs
|
27
|
+
- name: Audit
|
28
|
+
run: bundle exec ci-helper BundlerAudit
|
29
|
+
- name: Documentation coverage
|
30
|
+
run: bundle exec rake doc:coverage
|
31
|
+
- name: Coveralls
|
32
|
+
uses: coverallsapp/github-action@master
|
33
|
+
with:
|
34
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
35
|
+
specs:
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
|
38
|
+
env:
|
39
|
+
FULL_COVERAGE_CHECK: false
|
40
|
+
|
41
|
+
# We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
|
42
|
+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/lamian'
|
43
|
+
|
44
|
+
strategy:
|
45
|
+
fail-fast: false
|
46
|
+
matrix:
|
47
|
+
ruby: [2.5, 2.6, 2.7]
|
48
|
+
|
49
|
+
steps:
|
50
|
+
- uses: actions/checkout@v2
|
51
|
+
- uses: ruby/setup-ruby@v1
|
52
|
+
with:
|
53
|
+
ruby-version: ${{ matrix.ruby }}
|
54
|
+
bundler-cache: true
|
55
|
+
- name: Run specs
|
56
|
+
run: bundle exec ci-helper RunSpecs
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/Changelog.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Lamian version changes (since 0.1.0)
|
2
|
+
|
3
|
+
Update this on a pull request, under `Lamian::VERSION`
|
4
|
+
(also known as next version). If this constant would be changed without release,
|
5
|
+
I'll update it here too
|
6
|
+
|
7
|
+
## 1.3.0
|
8
|
+
* Add support for the (new sentry gem)[https://github.com/getsentry/sentry-ruby].
|
9
|
+
|
10
|
+
## 1.2.0
|
11
|
+
* Add `raven_log_size_limit` config option for limiting amount of data sent to sentry (defaults to `500_000`)
|
12
|
+
|
13
|
+
## 1.1.0
|
14
|
+
* Add support for sentry and sidekiq
|
15
|
+
|
16
|
+
## 1.0.0
|
17
|
+
|
18
|
+
* `6d8fee8` fixed a bug when ::Logger#log was not prepended. `::Logger#log` is an alias for `::Logger#add`,
|
19
|
+
which ruins concept of single entry point :(. Also tied it to lamian instance
|
20
|
+
|
21
|
+
## 0.3.3
|
22
|
+
|
23
|
+
* `8136689` fixed crashes when dump used outside lamian context
|
24
|
+
|
25
|
+
|
26
|
+
## 0.3.2
|
27
|
+
|
28
|
+
* `e57e6cec` Changed rails dependency from `~> 4.2` to `>= 4.2`
|
29
|
+
|
30
|
+
|
31
|
+
## 0.3.1
|
32
|
+
|
33
|
+
* 34ca83b5 Fixed formatting
|
34
|
+
|
35
|
+
Stabilized formatting api, which removes control sequences from loggers data.
|
36
|
+
E.g. `"[23mNice, lol[0m\n"` becomes `"Nice, lol\n"`
|
37
|
+
|
38
|
+
|
39
|
+
## 0.3.0
|
40
|
+
|
41
|
+
* `d24f895b` API update
|
42
|
+
|
43
|
+
Updated API, so lamian is now forced to be used with block.
|
44
|
+
It also simplified usage outside a middleware
|
45
|
+
|
46
|
+
|
47
|
+
## 0.2.0
|
48
|
+
* `3166517e` Added integrtation with rails
|
49
|
+
|
50
|
+
Injected middleware before `ExceptionNotification`, so `ExceptionNotification`
|
51
|
+
can use current log without any configuration. Also added some views
|
52
|
+
|
53
|
+
|
54
|
+
## 0.1.0
|
55
|
+
* `62eb8685` Made test version to check it's integration with rails application
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,278 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
lamian (1.4.0)
|
5
|
+
rails (>= 4.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actioncable (6.1.4.1)
|
11
|
+
actionpack (= 6.1.4.1)
|
12
|
+
activesupport (= 6.1.4.1)
|
13
|
+
nio4r (~> 2.0)
|
14
|
+
websocket-driver (>= 0.6.1)
|
15
|
+
actionmailbox (6.1.4.1)
|
16
|
+
actionpack (= 6.1.4.1)
|
17
|
+
activejob (= 6.1.4.1)
|
18
|
+
activerecord (= 6.1.4.1)
|
19
|
+
activestorage (= 6.1.4.1)
|
20
|
+
activesupport (= 6.1.4.1)
|
21
|
+
mail (>= 2.7.1)
|
22
|
+
actionmailer (6.1.4.1)
|
23
|
+
actionpack (= 6.1.4.1)
|
24
|
+
actionview (= 6.1.4.1)
|
25
|
+
activejob (= 6.1.4.1)
|
26
|
+
activesupport (= 6.1.4.1)
|
27
|
+
mail (~> 2.5, >= 2.5.4)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
actionpack (6.1.4.1)
|
30
|
+
actionview (= 6.1.4.1)
|
31
|
+
activesupport (= 6.1.4.1)
|
32
|
+
rack (~> 2.0, >= 2.0.9)
|
33
|
+
rack-test (>= 0.6.3)
|
34
|
+
rails-dom-testing (~> 2.0)
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
36
|
+
actiontext (6.1.4.1)
|
37
|
+
actionpack (= 6.1.4.1)
|
38
|
+
activerecord (= 6.1.4.1)
|
39
|
+
activestorage (= 6.1.4.1)
|
40
|
+
activesupport (= 6.1.4.1)
|
41
|
+
nokogiri (>= 1.8.5)
|
42
|
+
actionview (6.1.4.1)
|
43
|
+
activesupport (= 6.1.4.1)
|
44
|
+
builder (~> 3.1)
|
45
|
+
erubi (~> 1.4)
|
46
|
+
rails-dom-testing (~> 2.0)
|
47
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
48
|
+
activejob (6.1.4.1)
|
49
|
+
activesupport (= 6.1.4.1)
|
50
|
+
globalid (>= 0.3.6)
|
51
|
+
activemodel (6.1.4.1)
|
52
|
+
activesupport (= 6.1.4.1)
|
53
|
+
activerecord (6.1.4.1)
|
54
|
+
activemodel (= 6.1.4.1)
|
55
|
+
activesupport (= 6.1.4.1)
|
56
|
+
activestorage (6.1.4.1)
|
57
|
+
actionpack (= 6.1.4.1)
|
58
|
+
activejob (= 6.1.4.1)
|
59
|
+
activerecord (= 6.1.4.1)
|
60
|
+
activesupport (= 6.1.4.1)
|
61
|
+
marcel (~> 1.0.0)
|
62
|
+
mini_mime (>= 1.1.0)
|
63
|
+
activesupport (6.1.4.1)
|
64
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
65
|
+
i18n (>= 1.6, < 2)
|
66
|
+
minitest (>= 5.1)
|
67
|
+
tzinfo (~> 2.0)
|
68
|
+
zeitwerk (~> 2.3)
|
69
|
+
addressable (2.8.0)
|
70
|
+
public_suffix (>= 2.0.2, < 5.0)
|
71
|
+
ast (2.4.2)
|
72
|
+
builder (3.2.4)
|
73
|
+
bundler-audit (0.9.0.1)
|
74
|
+
bundler (>= 1.2.0, < 3)
|
75
|
+
thor (~> 1.0)
|
76
|
+
ci-helper (0.4.2)
|
77
|
+
colorize (~> 0.8)
|
78
|
+
dry-inflector (~> 0.2)
|
79
|
+
umbrellio-sequel-plugins (~> 0.4)
|
80
|
+
coderay (1.1.3)
|
81
|
+
colorize (0.8.1)
|
82
|
+
concurrent-ruby (1.1.9)
|
83
|
+
crass (1.0.6)
|
84
|
+
diff-lcs (1.4.4)
|
85
|
+
docile (1.4.0)
|
86
|
+
dry-inflector (0.2.1)
|
87
|
+
erubi (1.10.0)
|
88
|
+
faraday (1.8.0)
|
89
|
+
faraday-em_http (~> 1.0)
|
90
|
+
faraday-em_synchrony (~> 1.0)
|
91
|
+
faraday-excon (~> 1.1)
|
92
|
+
faraday-httpclient (~> 1.0.1)
|
93
|
+
faraday-net_http (~> 1.0)
|
94
|
+
faraday-net_http_persistent (~> 1.1)
|
95
|
+
faraday-patron (~> 1.0)
|
96
|
+
faraday-rack (~> 1.0)
|
97
|
+
multipart-post (>= 1.2, < 3)
|
98
|
+
ruby2_keywords (>= 0.0.4)
|
99
|
+
faraday-em_http (1.0.0)
|
100
|
+
faraday-em_synchrony (1.0.0)
|
101
|
+
faraday-excon (1.1.0)
|
102
|
+
faraday-httpclient (1.0.1)
|
103
|
+
faraday-net_http (1.0.1)
|
104
|
+
faraday-net_http_persistent (1.2.0)
|
105
|
+
faraday-patron (1.0.0)
|
106
|
+
faraday-rack (1.0.0)
|
107
|
+
globalid (0.5.2)
|
108
|
+
activesupport (>= 5.0)
|
109
|
+
i18n (1.8.10)
|
110
|
+
concurrent-ruby (~> 1.0)
|
111
|
+
launchy (2.5.0)
|
112
|
+
addressable (~> 2.7)
|
113
|
+
loofah (2.12.0)
|
114
|
+
crass (~> 1.0.2)
|
115
|
+
nokogiri (>= 1.5.9)
|
116
|
+
mail (2.7.1)
|
117
|
+
mini_mime (>= 0.1.1)
|
118
|
+
marcel (1.0.2)
|
119
|
+
method_source (1.0.0)
|
120
|
+
mini_mime (1.1.2)
|
121
|
+
minitest (5.14.4)
|
122
|
+
multipart-post (2.1.1)
|
123
|
+
nio4r (2.5.8)
|
124
|
+
nokogiri (1.12.5-x86_64-darwin)
|
125
|
+
racc (~> 1.4)
|
126
|
+
nokogiri (1.12.5-x86_64-linux)
|
127
|
+
racc (~> 1.4)
|
128
|
+
parallel (1.21.0)
|
129
|
+
parser (3.0.2.0)
|
130
|
+
ast (~> 2.4.1)
|
131
|
+
pry (0.14.1)
|
132
|
+
coderay (~> 1.1)
|
133
|
+
method_source (~> 1.0)
|
134
|
+
public_suffix (4.0.6)
|
135
|
+
racc (1.6.0)
|
136
|
+
rack (2.2.3)
|
137
|
+
rack-test (1.1.0)
|
138
|
+
rack (>= 1.0, < 3)
|
139
|
+
rails (6.1.4.1)
|
140
|
+
actioncable (= 6.1.4.1)
|
141
|
+
actionmailbox (= 6.1.4.1)
|
142
|
+
actionmailer (= 6.1.4.1)
|
143
|
+
actionpack (= 6.1.4.1)
|
144
|
+
actiontext (= 6.1.4.1)
|
145
|
+
actionview (= 6.1.4.1)
|
146
|
+
activejob (= 6.1.4.1)
|
147
|
+
activemodel (= 6.1.4.1)
|
148
|
+
activerecord (= 6.1.4.1)
|
149
|
+
activestorage (= 6.1.4.1)
|
150
|
+
activesupport (= 6.1.4.1)
|
151
|
+
bundler (>= 1.15.0)
|
152
|
+
railties (= 6.1.4.1)
|
153
|
+
sprockets-rails (>= 2.0.0)
|
154
|
+
rails-dom-testing (2.0.3)
|
155
|
+
activesupport (>= 4.2.0)
|
156
|
+
nokogiri (>= 1.6)
|
157
|
+
rails-html-sanitizer (1.4.2)
|
158
|
+
loofah (~> 2.3)
|
159
|
+
railties (6.1.4.1)
|
160
|
+
actionpack (= 6.1.4.1)
|
161
|
+
activesupport (= 6.1.4.1)
|
162
|
+
method_source
|
163
|
+
rake (>= 0.13)
|
164
|
+
thor (~> 1.0)
|
165
|
+
rainbow (3.0.0)
|
166
|
+
rake (13.0.6)
|
167
|
+
regexp_parser (2.1.1)
|
168
|
+
rexml (3.2.5)
|
169
|
+
rspec (3.10.0)
|
170
|
+
rspec-core (~> 3.10.0)
|
171
|
+
rspec-expectations (~> 3.10.0)
|
172
|
+
rspec-mocks (~> 3.10.0)
|
173
|
+
rspec-core (3.10.1)
|
174
|
+
rspec-support (~> 3.10.0)
|
175
|
+
rspec-expectations (3.10.1)
|
176
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
177
|
+
rspec-support (~> 3.10.0)
|
178
|
+
rspec-mocks (3.10.2)
|
179
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
180
|
+
rspec-support (~> 3.10.0)
|
181
|
+
rspec-support (3.10.2)
|
182
|
+
rubocop (1.17.0)
|
183
|
+
parallel (~> 1.10)
|
184
|
+
parser (>= 3.0.0.0)
|
185
|
+
rainbow (>= 2.2.2, < 4.0)
|
186
|
+
regexp_parser (>= 1.8, < 3.0)
|
187
|
+
rexml
|
188
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
189
|
+
ruby-progressbar (~> 1.7)
|
190
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
191
|
+
rubocop-ast (1.12.0)
|
192
|
+
parser (>= 3.0.1.1)
|
193
|
+
rubocop-config-umbrellio (1.17.0.53)
|
194
|
+
rubocop (= 1.17.0)
|
195
|
+
rubocop-performance (= 1.10.0)
|
196
|
+
rubocop-rails (= 2.9.1)
|
197
|
+
rubocop-rake (= 0.5.1)
|
198
|
+
rubocop-rspec (= 2.2.0)
|
199
|
+
rubocop-sequel (= 0.2.0)
|
200
|
+
rubocop-performance (1.10.0)
|
201
|
+
rubocop (>= 0.90.0, < 2.0)
|
202
|
+
rubocop-ast (>= 0.4.0)
|
203
|
+
rubocop-rails (2.9.1)
|
204
|
+
activesupport (>= 4.2.0)
|
205
|
+
rack (>= 1.1)
|
206
|
+
rubocop (>= 0.90.0, < 2.0)
|
207
|
+
rubocop-rake (0.5.1)
|
208
|
+
rubocop
|
209
|
+
rubocop-rspec (2.2.0)
|
210
|
+
rubocop (~> 1.0)
|
211
|
+
rubocop-ast (>= 1.1.0)
|
212
|
+
rubocop-sequel (0.2.0)
|
213
|
+
rubocop (~> 1.0)
|
214
|
+
ruby-progressbar (1.11.0)
|
215
|
+
ruby2_keywords (0.0.5)
|
216
|
+
semantic_logger (4.8.2)
|
217
|
+
concurrent-ruby (~> 1.0)
|
218
|
+
sentry-raven (3.1.2)
|
219
|
+
faraday (>= 1.0)
|
220
|
+
sentry-ruby (4.7.3)
|
221
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
222
|
+
faraday (>= 1.0)
|
223
|
+
sentry-ruby-core (= 4.7.3)
|
224
|
+
sentry-ruby-core (4.7.3)
|
225
|
+
concurrent-ruby
|
226
|
+
faraday
|
227
|
+
sequel (5.50.0)
|
228
|
+
simplecov (0.21.2)
|
229
|
+
docile (~> 1.1)
|
230
|
+
simplecov-html (~> 0.11)
|
231
|
+
simplecov_json_formatter (~> 0.1)
|
232
|
+
simplecov-html (0.12.3)
|
233
|
+
simplecov-lcov (0.8.0)
|
234
|
+
simplecov_json_formatter (0.1.3)
|
235
|
+
sprockets (4.0.2)
|
236
|
+
concurrent-ruby (~> 1.0)
|
237
|
+
rack (> 1, < 3)
|
238
|
+
sprockets-rails (3.2.2)
|
239
|
+
actionpack (>= 4.0)
|
240
|
+
activesupport (>= 4.0)
|
241
|
+
sprockets (>= 3.0.0)
|
242
|
+
symbiont-ruby (0.7.0)
|
243
|
+
thor (1.1.0)
|
244
|
+
tzinfo (2.0.4)
|
245
|
+
concurrent-ruby (~> 1.0)
|
246
|
+
umbrellio-sequel-plugins (0.5.1.27)
|
247
|
+
sequel
|
248
|
+
symbiont-ruby
|
249
|
+
unicode-display_width (2.1.0)
|
250
|
+
websocket-driver (0.7.5)
|
251
|
+
websocket-extensions (>= 0.1.0)
|
252
|
+
websocket-extensions (0.1.5)
|
253
|
+
yard (0.9.26)
|
254
|
+
zeitwerk (2.5.1)
|
255
|
+
|
256
|
+
PLATFORMS
|
257
|
+
x86_64-darwin-19
|
258
|
+
x86_64-darwin-20
|
259
|
+
x86_64-linux
|
260
|
+
|
261
|
+
DEPENDENCIES
|
262
|
+
bundler-audit
|
263
|
+
ci-helper
|
264
|
+
lamian!
|
265
|
+
launchy
|
266
|
+
pry
|
267
|
+
rake
|
268
|
+
rspec
|
269
|
+
rubocop-config-umbrellio
|
270
|
+
semantic_logger
|
271
|
+
sentry-raven
|
272
|
+
sentry-ruby
|
273
|
+
simplecov
|
274
|
+
simplecov-lcov
|
275
|
+
yard
|
276
|
+
|
277
|
+
BUNDLED WITH
|
278
|
+
2.2.30
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 JelF, Umbrellio
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# Lamian
|
2
|
+
[](https://github.com/umbrellio/lamian/actions) [](https://coveralls.io/github/umbrellio/lamian?branch=master) [](https://badge.fury.io/rb/lamian)
|
3
|
+
|
4
|
+
|
5
|
+
Lamian is an in-memory logger, which content could be released for error messages.
|
6
|
+
It is designed to work in pair with `exception_notification` gem inside rails
|
7
|
+
aplications
|
8
|
+
|
9
|
+
## Usage with ExceptionNotification
|
10
|
+
|
11
|
+
1. Add `gem 'lamian'` into your Gemfile
|
12
|
+
2. Extend `Rails.logger` and any other loggers you want to mirror by
|
13
|
+
`Lamian::LoggerExtension`: `Lamian.extend_logger(logger)`
|
14
|
+
3. Add 'request_log' section inside your `ExceptionNotification.configure`
|
15
|
+
(see [ExceptionNotification README](https://github.com/smartinez87/exception_notification/blob/master/README.md))
|
16
|
+
4. ExceptionNotification's messages would have 'Request Log' section
|
17
|
+
|
18
|
+
## Extended Usage
|
19
|
+
|
20
|
+
Add a 'request_log' section into ExceptionNotification's background section.
|
21
|
+
Add `Lamian.run { }` around code with logs you want to collect. Note, that
|
22
|
+
logs would be accessible only inside this section and removed after section end.
|
23
|
+
|
24
|
+
## Sentry (sentry-ruby)
|
25
|
+
|
26
|
+
### Usage
|
27
|
+
|
28
|
+
It automatically redefines `Sentry.configuration.before_send` callback
|
29
|
+
if Sentry initialization is completed. If `before_send` is already defined
|
30
|
+
it wraps custom callback.
|
31
|
+
|
32
|
+
### Usage with Sidekiq
|
33
|
+
|
34
|
+
You should add Lamian middleware to the Sidekiq initializer like this:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
config.server_middleware do |chain|
|
38
|
+
chain.prepend(Lamian::SidekiqSentryMiddleware)
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
### Usage with SemanticLogger
|
43
|
+
|
44
|
+
You should add Lamian appender to the SematicLogger appenders like this:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
SemanticLogger.add_appender(appender: Lamian::SemanticLoggerAppender.new)
|
48
|
+
```
|
49
|
+
|
50
|
+
## Raven (deprecated)
|
51
|
+
|
52
|
+
### Usage
|
53
|
+
|
54
|
+
Add this line to your Sentry initializer:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
Raven::Context.prepend(Lamian::RavenContextExtension)
|
58
|
+
```
|
59
|
+
|
60
|
+
### Usage with Sidekiq
|
61
|
+
|
62
|
+
You should add Lamian middleware to the Sidekiq initializer like this:
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
config.server_middleware do |chain|
|
66
|
+
chain.prepend(Lamian::SidekiqRavenMiddleware)
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
70
|
+
## Contribution
|
71
|
+
|
72
|
+
Feel free to contribute by making PRs and Issues on [GitHub](https://github.com/JelF/lamian)
|
73
|
+
You also can contact me using my email begdory4+lamian@gmail.com
|
74
|
+
|
75
|
+
## TODO
|
76
|
+
|
77
|
+
- It probably should be separated to `lamian` and `lamian-rails` gems.
|
78
|
+
Rails dependency is never cool
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rspec/core/rake_task"
|
5
|
+
require "rubocop/rake_task"
|
6
|
+
require "yard"
|
7
|
+
require "pathname"
|
8
|
+
require "launchy"
|
9
|
+
require "uri"
|
10
|
+
|
11
|
+
ROOT = Pathname.new(__FILE__).join("..")
|
12
|
+
|
13
|
+
RSpec::Core::RakeTask.new(:spec)
|
14
|
+
RuboCop::RakeTask.new(:lint)
|
15
|
+
|
16
|
+
YARD::Rake::YardocTask.new(:doc) do |t|
|
17
|
+
t.files = Dir[ROOT.join("lib/**/*.rb")]
|
18
|
+
t.options = %w[--private]
|
19
|
+
end
|
20
|
+
|
21
|
+
def open_in_browser(path)
|
22
|
+
Launchy.open(URI.join("file:///", path.to_s))
|
23
|
+
end
|
24
|
+
|
25
|
+
namespace :doc do
|
26
|
+
desc "open doc"
|
27
|
+
task open: :doc do
|
28
|
+
open_in_browser ROOT.join("doc/frames.html")
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "checks doc coverage"
|
32
|
+
task coverage: :doc do
|
33
|
+
# ideally you've already generated the database to .load it
|
34
|
+
# if not, have this task depend on the docs task.
|
35
|
+
YARD::Registry.load
|
36
|
+
objs = YARD::Registry.select do |o|
|
37
|
+
puts "pending #{o}" if /TODO|FIXME|@pending/.match?(o.docstring)
|
38
|
+
o.docstring.blank?
|
39
|
+
end
|
40
|
+
|
41
|
+
next if objs.empty?
|
42
|
+
puts "No documentation found for:"
|
43
|
+
objs.each { |x| puts "\t#{x}" }
|
44
|
+
|
45
|
+
raise "100% document coverage required"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
task default: %i[lint doc:coverage spec]
|
data/bin/console
ADDED
data/bin/rake
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
#
|
4
|
+
# This file was generated by Bundler.
|
5
|
+
#
|
6
|
+
# The application 'rake' is installed as part of a gem, and
|
7
|
+
# this file is here to facilitate running it.
|
8
|
+
#
|
9
|
+
|
10
|
+
require "pathname"
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
12
|
+
Pathname.new(__FILE__).realpath)
|
13
|
+
|
14
|
+
require "rubygems"
|
15
|
+
require "bundler/setup"
|
16
|
+
|
17
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rubocop
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
#
|
4
|
+
# This file was generated by Bundler.
|
5
|
+
#
|
6
|
+
# The application 'rubocop' is installed as part of a gem, and
|
7
|
+
# this file is here to facilitate running it.
|
8
|
+
#
|
9
|
+
|
10
|
+
require "pathname"
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
|
+
|
16
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/bin/setup
ADDED
data/lib/lamian/config.rb
CHANGED
@@ -6,9 +6,12 @@ module Lamian
|
|
6
6
|
# General lamian configuration class
|
7
7
|
# @attr formatter [Logger::Foramtter]
|
8
8
|
# formatter to use in lamian, global
|
9
|
-
|
9
|
+
# @attr raven_log_size_limit [Integer]
|
10
|
+
# size limit when sending lamian log to sentry, defaults to +500_000+
|
11
|
+
Config = Struct.new(:formatter, :raven_log_size_limit) do
|
10
12
|
def initialize
|
11
13
|
self.formatter = ::Logger::Formatter.new
|
14
|
+
self.raven_log_size_limit = 500_000
|
12
15
|
end
|
13
16
|
end
|
14
17
|
end
|
data/lib/lamian/engine.rb
CHANGED
@@ -1,20 +1,58 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rails"
|
4
|
-
require "exception_notification"
|
5
|
-
require "exception_notification/rails"
|
6
4
|
|
7
5
|
module Lamian
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# Lamian views are used in exception_notifier to provide
|
11
|
-
# request_log section
|
6
|
+
# This engine is automatically loaded by Rails
|
7
|
+
# @see https://edgeguides.rubyonrails.org/engines.html Rails::Engine docs
|
12
8
|
class Engine < ::Rails::Engine
|
13
|
-
|
14
|
-
ExceptionNotification::Rack,
|
15
|
-
::Lamian::Middleware,
|
16
|
-
)
|
17
|
-
|
9
|
+
# Lamian views are used in exception_notifier to provide request_log section
|
18
10
|
paths["app/views"] << "lib/lamian/rails_views"
|
11
|
+
|
12
|
+
initializer "lamian.use_rack_middleware" do |app|
|
13
|
+
# :nocov:
|
14
|
+
app.config.middleware.unshift(Lamian::Middleware)
|
15
|
+
# :nocov:
|
16
|
+
end
|
17
|
+
|
18
|
+
config.after_initialize do
|
19
|
+
# :nocov:
|
20
|
+
next unless defined?(Sentry)
|
21
|
+
next unless Sentry.initialized?
|
22
|
+
|
23
|
+
Sentry.configuration.before_send = rebuild_before_send
|
24
|
+
# :nocov:
|
25
|
+
end
|
26
|
+
|
27
|
+
# Reassembles the callback that runs before sending the event to the Sentry:
|
28
|
+
# connects the user callback with the callback that adds lamian logs to the event.
|
29
|
+
# @private
|
30
|
+
# @return [Proc] final callback.
|
31
|
+
def rebuild_before_send
|
32
|
+
defined_callback = Sentry.configuration.before_send || build_default_lambda
|
33
|
+
lamian_callback = build_lamian_callback
|
34
|
+
|
35
|
+
proc { |*args, **kwargs| lamian_callback.call(defined_callback.call(*args, **kwargs)) }
|
36
|
+
end
|
37
|
+
|
38
|
+
# Builds a callback, which does nothing.
|
39
|
+
# @private
|
40
|
+
# @return [Proc] empty callback.
|
41
|
+
def build_default_lambda
|
42
|
+
-> (event, _hint) { event }
|
43
|
+
end
|
44
|
+
|
45
|
+
# Builds a callback that adds logs to the event.
|
46
|
+
# @private
|
47
|
+
# @return [Proc] callback.
|
48
|
+
def build_lamian_callback
|
49
|
+
lambda do |event|
|
50
|
+
event.tap do |event|
|
51
|
+
extra = event&.extra or return
|
52
|
+
log = Lamian.dump_limited
|
53
|
+
extra[Lamian::SENTRY_EXTRA_KEY] = log if log
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
19
57
|
end
|
20
58
|
end
|
data/lib/lamian/logger.rb
CHANGED
@@ -7,12 +7,6 @@ module Lamian
|
|
7
7
|
# Provides thread-local loggers to catch teed messages from
|
8
8
|
# regular loggers.
|
9
9
|
# Uses :__lamian_logger thread variable
|
10
|
-
# @attr level [Int]
|
11
|
-
# current log level, implicitly set to zero
|
12
|
-
# @attr logdevs [Array(StringIO)]
|
13
|
-
# stack of log devices used to store logs
|
14
|
-
# @attr formatter [Logger::Formatter]
|
15
|
-
# formatter, inherited from Lamian.config
|
16
10
|
class Logger < ::Logger
|
17
11
|
# Provides access to logger bound to curent thread
|
18
12
|
# @return [Lamian::Logger] current logger
|
@@ -21,24 +15,30 @@ module Lamian
|
|
21
15
|
end
|
22
16
|
|
23
17
|
def initialize
|
18
|
+
super(nil)
|
24
19
|
self.level = 0
|
25
20
|
self.logdevs = []
|
26
|
-
self.formatter = Lamian.config.formatter
|
27
21
|
end
|
28
22
|
|
29
23
|
# @see Lamian.run
|
30
24
|
# Collects logs sent inside block
|
31
25
|
def run
|
32
|
-
|
26
|
+
logdevs.push(StringIO.new)
|
27
|
+
|
33
28
|
yield
|
34
29
|
ensure
|
35
|
-
|
30
|
+
logdevs.pop
|
36
31
|
end
|
37
32
|
|
38
33
|
# Part of Logger api, entry point for all logs
|
39
34
|
# extened to run on each log device in stack
|
40
35
|
def add(*args, &block)
|
41
|
-
|
36
|
+
@formatter = Lamian.config.formatter
|
37
|
+
|
38
|
+
logdevs.each do |logdev|
|
39
|
+
@logdev = logdev
|
40
|
+
super
|
41
|
+
end
|
42
42
|
end
|
43
43
|
|
44
44
|
# @see Lamian.dump
|
@@ -56,7 +56,13 @@ module Lamian
|
|
56
56
|
|
57
57
|
private
|
58
58
|
|
59
|
-
|
59
|
+
# @return [Int]
|
60
|
+
# current log level, implicitly set to zero
|
61
|
+
attr_accessor :level
|
62
|
+
|
63
|
+
# @return [Array(StringIO)]
|
64
|
+
# stack of log devices used to store logs
|
65
|
+
attr_accessor :logdevs
|
60
66
|
|
61
67
|
# Formats string using given format
|
62
68
|
# @todo create `formatters` interface to allow real format selection
|
@@ -71,26 +77,5 @@ module Lamian
|
|
71
77
|
return unless string
|
72
78
|
string.gsub!(/\[\d{1,2}m/, "")
|
73
79
|
end
|
74
|
-
|
75
|
-
# Pushes new logdev in the start of #run call
|
76
|
-
# @param logdev [StringIO] new StringIO
|
77
|
-
def push_logdev(logdev)
|
78
|
-
logdevs << logdev
|
79
|
-
end
|
80
|
-
|
81
|
-
# Pops logdev in the end of #run call
|
82
|
-
# @return [StringIO] logdev
|
83
|
-
def pop_logdev
|
84
|
-
logdevs.pop
|
85
|
-
end
|
86
|
-
|
87
|
-
# Runs specific block with all logdevs in stack to
|
88
|
-
# populate them all
|
89
|
-
def each_logdev
|
90
|
-
logdevs.each do |logdev|
|
91
|
-
@logdev = logdev
|
92
|
-
yield
|
93
|
-
end
|
94
|
-
end
|
95
80
|
end
|
96
81
|
end
|
data/lib/lamian/middleware.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Lamian
|
4
|
-
# Provides rack middleware, which allows to
|
4
|
+
# Provides rack middleware, which allows to collect request logs
|
5
5
|
# @attr app [Proc] stored application
|
6
6
|
class Middleware
|
7
7
|
# @param app [Proc] stored application
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A patch for Raven::Context class
|
4
|
+
module Lamian::RavenContextExtension
|
5
|
+
# Adds current lamian log to the extra part of all raven events generated inside Lamian.run block
|
6
|
+
# @see https://www.rubydoc.info/gems/sentry-raven/0.9.2/Raven/Context#extra-instance_method
|
7
|
+
def extra
|
8
|
+
log = Lamian.dump_limited
|
9
|
+
log ? super.merge!(Lamian::SENTRY_EXTRA_KEY => log) : super
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lamian
|
4
|
+
# Custom appender for the `semantic_logger` library.
|
5
|
+
# This appender adds all logs to the current Lamian logger.
|
6
|
+
# Since Lamian stores logs in a thread variable,
|
7
|
+
# it is necessary that this appender writes logs synchronously:
|
8
|
+
# just call `SematicLogger.sync!` somewhere in the initialization process.
|
9
|
+
# @see https://logger.rocketjob.io Semantic Logger documentation.
|
10
|
+
class SemanticLoggerAppender < SemanticLogger::Subscriber
|
11
|
+
# Mapping between standard Logger severity and SemanticLogger log levels.
|
12
|
+
LOGGER_LEVELS_MAPPING = { trace: 0, debug: 0, info: 1, warn: 2, error: 3, fatal: 4 }.freeze
|
13
|
+
|
14
|
+
# The method to be implemented when creating a custom appender.
|
15
|
+
# @see https://logger.rocketjob.io/custom_appenders.html Documentation about custom appenders.
|
16
|
+
# @returns [Boolean]
|
17
|
+
def log(log)
|
18
|
+
mapped_level = LOGGER_LEVELS_MAPPING[log.level] || ::Logger::UNKNOWN
|
19
|
+
Lamian::Logger.current.add(mapped_level, log.message)
|
20
|
+
|
21
|
+
true
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A sidekiq middleware
|
4
|
+
class Lamian::SidekiqRavenMiddleware
|
5
|
+
# Adds current lamian log to the extra part of raven events generated inside sidekiq jobs
|
6
|
+
def call(*)
|
7
|
+
Lamian.run do
|
8
|
+
yield
|
9
|
+
rescue Exception # rubocop:disable Lint/RescueException
|
10
|
+
Raven.extra_context # Just trigger saving of the current log
|
11
|
+
raise
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A sidekiq middleware
|
4
|
+
class Lamian::SidekiqSentryMiddleware
|
5
|
+
# Adds current lamian log to the extra part of raven events generated inside sidekiq jobs
|
6
|
+
def call(*)
|
7
|
+
Lamian.run do
|
8
|
+
yield
|
9
|
+
rescue Exception # rubocop:disable Lint/RescueException
|
10
|
+
# Save current log
|
11
|
+
log = Lamian.dump_limited
|
12
|
+
Sentry.set_extras(Lamian::SENTRY_EXTRA_KEY => log) if log
|
13
|
+
raise
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/lamian/version.rb
CHANGED
data/lib/lamian.rb
CHANGED
@@ -10,6 +10,13 @@ module Lamian
|
|
10
10
|
autoload :Logger, "lamian/logger"
|
11
11
|
autoload :LoggerExtension, "lamian/logger_extension"
|
12
12
|
autoload :Middleware, "lamian/middleware"
|
13
|
+
autoload :RavenContextExtension, "lamian/raven_context_extension"
|
14
|
+
autoload :SidekiqRavenMiddleware, "lamian/sidekiq_raven_middleware"
|
15
|
+
autoload :SidekiqSentryMiddleware, "lamian/sidekiq_sentry_middleware"
|
16
|
+
autoload :SemanticLoggerAppender, "lamian/semantic_logger_appender"
|
17
|
+
|
18
|
+
# The key under which logs are stored in the Sentry extra data.
|
19
|
+
SENTRY_EXTRA_KEY = :lamian_log
|
13
20
|
|
14
21
|
require "lamian/engine"
|
15
22
|
|
@@ -43,12 +50,12 @@ module Lamian
|
|
43
50
|
end
|
44
51
|
|
45
52
|
# Collects logs sent inside block
|
46
|
-
def run
|
47
|
-
logger.run
|
53
|
+
def run(&block)
|
54
|
+
logger.run(&block)
|
48
55
|
end
|
49
56
|
|
50
57
|
# Dumps log collected in this run
|
51
|
-
# @
|
58
|
+
# @param format [Symbol]
|
52
59
|
# requested format of log. At this point, returns raw log if falsey
|
53
60
|
# or log without controll sequences (such as '[23m') if truthy
|
54
61
|
# value given (for now)
|
@@ -56,5 +63,11 @@ module Lamian
|
|
56
63
|
def dump(format: nil)
|
57
64
|
logger.dump(format: format)
|
58
65
|
end
|
66
|
+
|
67
|
+
# Truncates the collected log to the specified limit and dumps it.
|
68
|
+
# @return [String, nil] truncated formatted log.
|
69
|
+
def dump_limited
|
70
|
+
dump(format: :txt)&.slice(0, Lamian.config.raven_log_size_limit)
|
71
|
+
end
|
59
72
|
end
|
60
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lamian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JelF
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -25,13 +25,13 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler-audit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
|
-
type: :
|
34
|
+
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
@@ -39,131 +39,173 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: ci-helper
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: launchy
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: rake
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
|
-
- - "
|
87
|
+
- - ">="
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
89
|
+
version: '0'
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
|
-
- - "
|
94
|
+
- - ">="
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rspec
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
|
-
- - "
|
101
|
+
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
103
|
+
version: '0'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- - "
|
108
|
+
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
110
|
+
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: rubocop-config-umbrellio
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
117
|
+
version: '0'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- -
|
122
|
+
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
124
|
+
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
126
|
+
name: semantic_logger
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- - "
|
129
|
+
- - ">="
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0
|
131
|
+
version: '0'
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
|
-
- - "
|
136
|
+
- - ">="
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0
|
138
|
+
version: '0'
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
140
|
+
name: sentry-raven
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
114
142
|
requirements:
|
115
|
-
- - "
|
143
|
+
- - ">="
|
116
144
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0
|
145
|
+
version: '0'
|
118
146
|
type: :development
|
119
147
|
prerelease: false
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
149
|
requirements:
|
122
|
-
- - "
|
150
|
+
- - ">="
|
123
151
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0
|
152
|
+
version: '0'
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
154
|
+
name: sentry-ruby
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
128
156
|
requirements:
|
129
|
-
- - "
|
157
|
+
- - ">="
|
130
158
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0
|
159
|
+
version: '0'
|
132
160
|
type: :development
|
133
161
|
prerelease: false
|
134
162
|
version_requirements: !ruby/object:Gem::Requirement
|
135
163
|
requirements:
|
136
|
-
- - "
|
164
|
+
- - ">="
|
137
165
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0
|
166
|
+
version: '0'
|
139
167
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
168
|
+
name: simplecov
|
141
169
|
requirement: !ruby/object:Gem::Requirement
|
142
170
|
requirements:
|
143
|
-
- - "
|
171
|
+
- - ">="
|
144
172
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: simplecov-lcov
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
146
188
|
type: :development
|
147
189
|
prerelease: false
|
148
190
|
version_requirements: !ruby/object:Gem::Requirement
|
149
191
|
requirements:
|
150
|
-
- - "
|
192
|
+
- - ">="
|
151
193
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
194
|
+
version: '0'
|
153
195
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
196
|
+
name: yard
|
155
197
|
requirement: !ruby/object:Gem::Requirement
|
156
198
|
requirements:
|
157
199
|
- - ">="
|
158
200
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
201
|
+
version: '0'
|
160
202
|
type: :development
|
161
203
|
prerelease: false
|
162
204
|
version_requirements: !ruby/object:Gem::Requirement
|
163
205
|
requirements:
|
164
206
|
- - ">="
|
165
207
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
208
|
+
version: '0'
|
167
209
|
description: Add logs to your error messages, using exception_notifier or smth like
|
168
210
|
it
|
169
211
|
email:
|
@@ -172,6 +214,19 @@ executables: []
|
|
172
214
|
extensions: []
|
173
215
|
extra_rdoc_files: []
|
174
216
|
files:
|
217
|
+
- ".github/workflows/test.yml"
|
218
|
+
- ".gitignore"
|
219
|
+
- ".rubocop.yml"
|
220
|
+
- Changelog.md
|
221
|
+
- Gemfile
|
222
|
+
- Gemfile.lock
|
223
|
+
- LICENSE.txt
|
224
|
+
- README.md
|
225
|
+
- Rakefile
|
226
|
+
- bin/console
|
227
|
+
- bin/rake
|
228
|
+
- bin/rubocop
|
229
|
+
- bin/setup
|
175
230
|
- lib/lamian.rb
|
176
231
|
- lib/lamian/config.rb
|
177
232
|
- lib/lamian/engine.rb
|
@@ -180,11 +235,16 @@ files:
|
|
180
235
|
- lib/lamian/middleware.rb
|
181
236
|
- lib/lamian/rails_views/exception_notifier/_request_log.html.erb
|
182
237
|
- lib/lamian/rails_views/exception_notifier/_request_log.text.erb
|
238
|
+
- lib/lamian/raven_context_extension.rb
|
239
|
+
- lib/lamian/semantic_logger_appender.rb
|
240
|
+
- lib/lamian/sidekiq_raven_middleware.rb
|
241
|
+
- lib/lamian/sidekiq_sentry_middleware.rb
|
183
242
|
- lib/lamian/version.rb
|
184
|
-
homepage: https://github.com/
|
185
|
-
licenses:
|
243
|
+
homepage: https://github.com/umbrellio/lamian
|
244
|
+
licenses:
|
245
|
+
- MIT
|
186
246
|
metadata: {}
|
187
|
-
post_install_message:
|
247
|
+
post_install_message:
|
188
248
|
rdoc_options: []
|
189
249
|
require_paths:
|
190
250
|
- lib
|
@@ -192,16 +252,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
192
252
|
requirements:
|
193
253
|
- - ">="
|
194
254
|
- !ruby/object:Gem::Version
|
195
|
-
version:
|
255
|
+
version: 2.5.0
|
196
256
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
257
|
requirements:
|
198
258
|
- - ">="
|
199
259
|
- !ruby/object:Gem::Version
|
200
260
|
version: '0'
|
201
261
|
requirements: []
|
202
|
-
|
203
|
-
|
204
|
-
signing_key:
|
262
|
+
rubygems_version: 3.2.30
|
263
|
+
signing_key:
|
205
264
|
specification_version: 4
|
206
265
|
summary: Add logs to your error messages
|
207
266
|
test_files: []
|