heavylog 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a01b4798a9eccba2129d251ce94305a062a5ba47bef3a37d81674ef730ea0c8a
4
- data.tar.gz: a2e26f6f95305729667ba8bed2e2d739200c18ae972efe40a295e7e15163c174
3
+ metadata.gz: 4752329017d62fa9e1508a580baa5bc1975f38bb39f0409b903ad0928b995c4d
4
+ data.tar.gz: 97906ad6c259f2745c0d08adc7639ec47830ea6509d119585b84737c2547c8b1
5
5
  SHA512:
6
- metadata.gz: 45c91792eb8cd223555cebe0709501677ff73583bd72b60d88e4b364caa85d796e2c75d93a131745e246eb9509ade848207f74086765f30976b4228ba61a3daa
7
- data.tar.gz: 6a0eb6464ce38bd89294ed7be9d68b9ff2465ce2734e2904a88234ff1bb528b0a1f1e9741908cb5aca7334003ace4f79b06804468107d70804169ad91832c811
6
+ metadata.gz: cf0f5e0993eeab83b3fbe3efd8d5358126dd64617da61cb7d6e3497bf13cf369f1ee8b57cb1a4b4a1cdeda4873af2a21bf6eec54db1e9e8950fba6cf06aedd63
7
+ data.tar.gz: 65ab525eb488103b3f9fd614131943bf2e8c66efb421aab673b5d3da28ca070cdd0631d67d7f2fc50eaeb458c6cb0216f6da6e439547cc9a645fb950a9fa8768
@@ -12,7 +12,7 @@ jobs:
12
12
  - name: Set up Ruby
13
13
  uses: actions/setup-ruby@v1
14
14
  with:
15
- ruby-version: 2.6.5
15
+ ruby-version: 3.0.0
16
16
 
17
17
  - uses: actions/cache@v1
18
18
  with:
data/.rubocop.yml CHANGED
@@ -2,7 +2,7 @@ require:
2
2
  - rubocop-performance
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.6
5
+ TargetRubyVersion: 3.0
6
6
 
7
7
  # # Commonly used screens these days easily fit more than 80 characters.
8
8
  Layout/LineLength:
data/Gemfile.lock CHANGED
@@ -10,55 +10,58 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (6.0.2.1)
14
- actionview (= 6.0.2.1)
15
- activesupport (= 6.0.2.1)
16
- rack (~> 2.0, >= 2.0.8)
13
+ actionpack (6.1.3.1)
14
+ actionview (= 6.1.3.1)
15
+ activesupport (= 6.1.3.1)
16
+ rack (~> 2.0, >= 2.0.9)
17
17
  rack-test (>= 0.6.3)
18
18
  rails-dom-testing (~> 2.0)
19
19
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
20
- actionview (6.0.2.1)
21
- activesupport (= 6.0.2.1)
20
+ actionview (6.1.3.1)
21
+ activesupport (= 6.1.3.1)
22
22
  builder (~> 3.1)
23
23
  erubi (~> 1.4)
24
24
  rails-dom-testing (~> 2.0)
25
25
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
26
- activesupport (6.0.2.1)
26
+ activesupport (6.1.3.1)
27
27
  concurrent-ruby (~> 1.0, >= 1.0.2)
28
- i18n (>= 0.7, < 2)
29
- minitest (~> 5.1)
30
- tzinfo (~> 1.1)
31
- zeitwerk (~> 2.2)
32
- ast (2.4.0)
28
+ i18n (>= 1.6, < 2)
29
+ minitest (>= 5.1)
30
+ tzinfo (~> 2.0)
31
+ zeitwerk (~> 2.3)
32
+ ast (2.4.2)
33
33
  backport (1.1.2)
34
- benchmark (0.1.0)
34
+ benchmark (0.1.1)
35
35
  builder (3.2.4)
36
- concurrent-ruby (1.1.6)
37
- connection_pool (2.2.2)
36
+ concurrent-ruby (1.1.8)
37
+ connection_pool (2.2.3)
38
38
  crass (1.0.6)
39
- diff-lcs (1.3)
40
- docile (1.3.2)
39
+ diff-lcs (1.4.4)
40
+ docile (1.3.5)
41
41
  e2mmap (0.1.0)
42
- erubi (1.9.0)
43
- i18n (1.8.2)
42
+ erubi (1.10.0)
43
+ i18n (1.8.10)
44
44
  concurrent-ruby (~> 1.0)
45
45
  jaro_winkler (1.5.4)
46
- json (2.3.0)
47
- loofah (2.4.0)
46
+ json (2.5.1)
47
+ kramdown (2.3.1)
48
+ rexml
49
+ kramdown-parser-gfm (1.1.0)
50
+ kramdown (~> 2.0)
51
+ loofah (2.9.0)
48
52
  crass (~> 1.0.2)
49
53
  nokogiri (>= 1.5.9)
50
- maruku (0.7.3)
51
- method_source (0.9.2)
52
- mini_portile2 (2.4.0)
53
- minitest (5.14.0)
54
- nokogiri (1.10.8)
55
- mini_portile2 (~> 2.4.0)
56
- parallel (1.19.1)
57
- parser (2.7.0.2)
58
- ast (~> 2.4.0)
59
- rack (2.2.2)
60
- rack-protection (2.0.8.1)
61
- rack
54
+ method_source (1.0.0)
55
+ mini_portile2 (2.5.0)
56
+ minitest (5.14.4)
57
+ nokogiri (1.11.2)
58
+ mini_portile2 (~> 2.5.0)
59
+ racc (~> 1.4)
60
+ parallel (1.20.1)
61
+ parser (3.0.0.0)
62
+ ast (~> 2.4.1)
63
+ racc (1.5.2)
64
+ rack (2.2.3)
62
65
  rack-test (1.1.0)
63
66
  rack (>= 1.0, < 3)
64
67
  rails-dom-testing (2.0.3)
@@ -66,76 +69,78 @@ GEM
66
69
  nokogiri (>= 1.6)
67
70
  rails-html-sanitizer (1.3.0)
68
71
  loofah (~> 2.3)
69
- railties (6.0.2.1)
70
- actionpack (= 6.0.2.1)
71
- activesupport (= 6.0.2.1)
72
+ railties (6.1.3.1)
73
+ actionpack (= 6.1.3.1)
74
+ activesupport (= 6.1.3.1)
72
75
  method_source
73
76
  rake (>= 0.8.7)
74
- thor (>= 0.20.3, < 2.0)
77
+ thor (~> 1.0)
75
78
  rainbow (3.0.0)
76
- rake (10.5.0)
77
- redis (4.1.3)
79
+ rake (13.0.3)
80
+ redis (4.2.5)
81
+ regexp_parser (2.1.1)
78
82
  request_store (1.5.0)
79
83
  rack (>= 1.4)
80
- reverse_markdown (1.4.0)
84
+ reverse_markdown (2.0.0)
81
85
  nokogiri
82
86
  rexml (3.2.4)
83
- rspec (3.9.0)
84
- rspec-core (~> 3.9.0)
85
- rspec-expectations (~> 3.9.0)
86
- rspec-mocks (~> 3.9.0)
87
- rspec-core (3.9.1)
88
- rspec-support (~> 3.9.1)
89
- rspec-expectations (3.9.0)
87
+ rspec (3.10.0)
88
+ rspec-core (~> 3.10.0)
89
+ rspec-expectations (~> 3.10.0)
90
+ rspec-mocks (~> 3.10.0)
91
+ rspec-core (3.10.1)
92
+ rspec-support (~> 3.10.0)
93
+ rspec-expectations (3.10.1)
90
94
  diff-lcs (>= 1.2.0, < 2.0)
91
- rspec-support (~> 3.9.0)
92
- rspec-mocks (3.9.1)
95
+ rspec-support (~> 3.10.0)
96
+ rspec-mocks (3.10.2)
93
97
  diff-lcs (>= 1.2.0, < 2.0)
94
- rspec-support (~> 3.9.0)
95
- rspec-support (3.9.2)
96
- rubocop (0.80.0)
97
- jaro_winkler (~> 1.5.1)
98
+ rspec-support (~> 3.10.0)
99
+ rspec-support (3.10.2)
100
+ rubocop (0.93.1)
98
101
  parallel (~> 1.10)
99
- parser (>= 2.7.0.1)
102
+ parser (>= 2.7.1.5)
100
103
  rainbow (>= 2.2.2, < 4.0)
104
+ regexp_parser (>= 1.8)
101
105
  rexml
106
+ rubocop-ast (>= 0.6.0)
102
107
  ruby-progressbar (~> 1.7)
103
- unicode-display_width (>= 1.4.0, < 1.7)
108
+ unicode-display_width (>= 1.4.0, < 2.0)
109
+ rubocop-ast (1.4.1)
110
+ parser (>= 2.7.1.5)
104
111
  rubocop-performance (1.5.2)
105
112
  rubocop (>= 0.71.0)
106
- ruby-progressbar (1.10.1)
107
- sidekiq (6.0.5)
113
+ ruby-progressbar (1.11.0)
114
+ sidekiq (6.2.0)
108
115
  connection_pool (>= 2.2.2)
109
116
  rack (~> 2.0)
110
- rack-protection (>= 2.0.0)
111
- redis (>= 4.1.0)
117
+ redis (>= 4.2.0)
112
118
  simplecov (0.17.1)
113
119
  docile (~> 1.1)
114
120
  json (>= 1.8, < 3)
115
121
  simplecov-html (~> 0.10.0)
116
122
  simplecov-html (0.10.2)
117
- solargraph (0.38.5)
123
+ solargraph (0.40.4)
118
124
  backport (~> 1.1)
119
125
  benchmark
120
126
  bundler (>= 1.17.2)
121
127
  e2mmap
122
128
  jaro_winkler (~> 1.5)
123
- maruku (~> 0.7, >= 0.7.3)
124
- nokogiri (~> 1.9, >= 1.9.1)
125
- parser (~> 2.3)
126
- reverse_markdown (~> 1.0, >= 1.0.5)
127
- rubocop (~> 0.52)
129
+ kramdown (~> 2.3)
130
+ kramdown-parser-gfm (~> 1.1)
131
+ parser (~> 3.0)
132
+ reverse_markdown (>= 1.0.5, < 3)
133
+ rubocop (>= 0.52)
128
134
  thor (~> 1.0)
129
135
  tilt (~> 2.0)
130
- yard (~> 0.9)
131
- thor (1.0.1)
132
- thread_safe (0.3.6)
136
+ yard (~> 0.9, >= 0.9.24)
137
+ thor (1.1.0)
133
138
  tilt (2.0.10)
134
- tzinfo (1.2.6)
135
- thread_safe (~> 0.1)
136
- unicode-display_width (1.6.1)
137
- yard (0.9.24)
138
- zeitwerk (2.3.0)
139
+ tzinfo (2.0.4)
140
+ concurrent-ruby (~> 1.0)
141
+ unicode-display_width (1.7.0)
142
+ yard (0.9.26)
143
+ zeitwerk (2.4.2)
139
144
 
140
145
  PLATFORMS
141
146
  ruby
@@ -143,13 +148,13 @@ PLATFORMS
143
148
  DEPENDENCIES
144
149
  bundler (~> 2.0)
145
150
  heavylog!
146
- rake (~> 10.0)
151
+ rake (~> 13.0)
147
152
  rspec (~> 3.0)
148
153
  rubocop (~> 0.71)
149
154
  rubocop-performance (~> 1.5.2)
150
155
  sidekiq (>= 5.0)
151
156
  simplecov (~> 0.17.1)
152
- solargraph (~> 0.38.5)
157
+ solargraph
153
158
 
154
159
  BUNDLED WITH
155
- 2.0.2
160
+ 2.2.14
data/heavylog.gemspec CHANGED
@@ -23,13 +23,13 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 2.0"
26
- spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rake", "~> 13.0"
27
27
  spec.add_development_dependency "rspec", "~> 3.0"
28
28
  spec.add_development_dependency "rubocop", "~> 0.71"
29
29
  spec.add_development_dependency "rubocop-performance", "~> 1.5.2"
30
30
  spec.add_development_dependency "simplecov", "~> 0.17.1"
31
31
  spec.add_development_dependency "sidekiq", ">= 5.0"
32
- spec.add_development_dependency "solargraph", "~> 0.38.5"
32
+ spec.add_development_dependency "solargraph"
33
33
 
34
34
  spec.add_runtime_dependency "actionpack", ">= 5"
35
35
  spec.add_runtime_dependency "activesupport", ">= 5"
data/lib/heavylog.rb CHANGED
@@ -138,6 +138,8 @@ module Heavylog
138
138
 
139
139
  formatted = Heavylog.formatter.call(request)
140
140
  Heavylog.logger.send(Heavylog.log_level, formatted)
141
+ rescue StandardError => e
142
+ config.error_handler&.(exception: e)
141
143
  end
142
144
 
143
145
  def finish_sidekiq
@@ -7,6 +7,9 @@ module Heavylog
7
7
  config.heavylog.path = "log/heavylog.log"
8
8
  config.heavylog.message_limit = 1024 * 1024 * 50 # 50MB
9
9
  config.heavylog.log_sidekiq = false
10
+ config.heavylog.error_handler = lambda { |e:|
11
+ Kernel.puts "HeavyLog: Error writing to log: #{e.class}: #{e.message}\n #{e.backtrace.join("\n ")}"
12
+ }
10
13
 
11
14
  initializer "heavylog.insert_middleware" do |app|
12
15
  app.config.middleware.insert_before Rails::Rack::Logger, Heavylog::Middleware
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Heavylog
4
- VERSION = "0.0.17"
4
+ VERSION = "0.0.18"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heavylog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristjan Rang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-17 00:00:00.000000000 Z
11
+ date: 2021-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: solargraph
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 0.38.5
117
+ version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 0.38.5
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: actionpack
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  - !ruby/object:Gem::Version
229
229
  version: '0'
230
230
  requirements: []
231
- rubygems_version: 3.1.2
231
+ rubygems_version: 3.2.3
232
232
  signing_key:
233
233
  specification_version: 4
234
234
  summary: Format all Rails logging per request