lorekeeper 2.6.1 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +19 -3
- data/.rubocop.yml +10 -4
- data/.rubocop_todo.yml +28 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +2 -0
- data/lib/lorekeeper/backtrace_cleaner.rb +1 -0
- data/lib/lorekeeper/json_logger.rb +3 -3
- data/lib/lorekeeper/multi_logger.rb +2 -2
- data/lib/lorekeeper/simple_logger.rb +1 -1
- data/lib/lorekeeper/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d211dae4a4b4384c1088e25ca7f3153be286c4dafa9a5e6b00f2d1f5de1f24ce
|
4
|
+
data.tar.gz: e352f7504c9ab8425340aac4903edb445fcee8ddb4480d38929570552aa22fc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a88a2169e5d597f72ae6f882e2395825c21a18e561700e8b29108f16922e822bbf5c9ca9050953c6feb58725ebffb40215293f58fc2ffdee8488b46e9a63c265
|
7
|
+
data.tar.gz: 4793d8b3ade333e955b79c38940289a42e3ca103b5200277aa8997ec12be3548c86eaf82e1b7197009bae467fbaf76a833631f20d543f05a90c81c8fe978dd14
|
data/.github/workflows/build.yml
CHANGED
@@ -14,14 +14,27 @@ jobs:
|
|
14
14
|
runs-on: ubuntu-latest
|
15
15
|
strategy:
|
16
16
|
matrix:
|
17
|
-
ruby
|
17
|
+
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
|
18
|
+
rails: ['5.2.7', '6.0.4', '6.1.7', '7.0.8', '7.1.1']
|
19
|
+
include:
|
20
|
+
- rails: '4.0.1'
|
21
|
+
ruby: '2.7'
|
22
|
+
- rails: '4.1.1'
|
23
|
+
ruby: '2.7'
|
24
|
+
- rails: '4.2.1'
|
25
|
+
ruby: '2.7'
|
26
|
+
- rails: '5.0.1'
|
27
|
+
ruby: '2.7'
|
28
|
+
- rails: '5.1.1'
|
29
|
+
ruby: '2.7'
|
18
30
|
|
19
31
|
steps:
|
20
|
-
- uses: actions/checkout@
|
32
|
+
- uses: actions/checkout@v4
|
21
33
|
- name: Set up Ruby
|
22
34
|
uses: ruby/setup-ruby@v1
|
23
35
|
with:
|
24
|
-
ruby-version: ${{ matrix.ruby
|
36
|
+
ruby-version: ${{ matrix.ruby }}
|
37
|
+
cache-version: rails-${{ matrix.rails }} # for the cache key
|
25
38
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
26
39
|
- name: Run rubocop
|
27
40
|
run: bundle exec rubocop
|
@@ -29,3 +42,6 @@ jobs:
|
|
29
42
|
run: bundle exec rspec
|
30
43
|
- name: Run benchmark
|
31
44
|
run: bundle exec rake benchmark
|
45
|
+
|
46
|
+
env:
|
47
|
+
RAILS_VER: ${{ matrix.rails }}
|
data/.rubocop.yml
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
1
3
|
require:
|
2
4
|
- rubocop-performance
|
3
5
|
|
@@ -12,16 +14,20 @@ AllCops:
|
|
12
14
|
#
|
13
15
|
- 'vendor/bundle/**/*'
|
14
16
|
|
15
|
-
Lint/ConstantDefinitionInBlock:
|
16
|
-
Exclude:
|
17
|
-
- 'spec/**/*'
|
18
|
-
|
19
17
|
Layout/ArgumentAlignment:
|
20
18
|
EnforcedStyle: with_fixed_indentation
|
21
19
|
|
22
20
|
Layout/FirstHashElementIndentation:
|
23
21
|
EnforcedStyle: consistent
|
24
22
|
|
23
|
+
Lint/ConstantDefinitionInBlock:
|
24
|
+
Exclude:
|
25
|
+
- 'spec/**/*'
|
26
|
+
|
27
|
+
Lint/StructNewOverride:
|
28
|
+
Exclude:
|
29
|
+
- spec/lib/lorekeeper/backtrace_cleaner_spec.rb
|
30
|
+
|
25
31
|
Metrics/ParameterLists:
|
26
32
|
CountKeywordArgs: false
|
27
33
|
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2023-10-30 07:24:07 UTC using RuboCop version 1.24.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: EnforcedStyle.
|
12
|
+
# SupportedStyles: space, no_space
|
13
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
14
|
+
Exclude:
|
15
|
+
- 'lib/lorekeeper/multi_logger.rb'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# Configuration parameters: AllowedMethods.
|
19
|
+
# AllowedMethods: respond_to_missing?
|
20
|
+
Style/OptionalBooleanParameter:
|
21
|
+
Exclude:
|
22
|
+
- 'lib/lorekeeper/multi_logger.rb'
|
23
|
+
|
24
|
+
# Offense count: 1
|
25
|
+
# Cop supports --auto-correct.
|
26
|
+
Style/RedundantFreeze:
|
27
|
+
Exclude:
|
28
|
+
- 'lib/lorekeeper/backtrace_cleaner.rb'
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -38,6 +38,7 @@ module Lorekeeper
|
|
38
38
|
last_index = nil
|
39
39
|
result = []
|
40
40
|
backtrace.each_with_index do |line, idx|
|
41
|
+
line = line.to_s
|
41
42
|
if line.start_with?(@rails_root) && @gem_path.none? { |path| line.start_with?(path) }
|
42
43
|
result << line[@rails_root_size..]
|
43
44
|
last_index = idx
|
@@ -28,10 +28,10 @@ module Lorekeeper
|
|
28
28
|
# Delegates methods to the existing Logger instance
|
29
29
|
# We are extending the logger API with methods error_with_data, etc
|
30
30
|
LOGGING_METHODS.each do |method_name|
|
31
|
-
define_method "#{method_name}_with_data", ->(message_param = nil, data = {}, &block) {
|
31
|
+
define_method :"#{method_name}_with_data", ->(message_param = nil, data = {}, &block) {
|
32
32
|
return true if METHOD_SEVERITY_MAP[method_name] < @level
|
33
33
|
|
34
|
-
extra_fields = { DATA =>
|
34
|
+
extra_fields = { DATA => data || {} }
|
35
35
|
with_extra_fields(extra_fields) do
|
36
36
|
add(METHOD_SEVERITY_MAP[method_name], message_param, nil, &block)
|
37
37
|
end
|
@@ -87,7 +87,7 @@ module Lorekeeper
|
|
87
87
|
else
|
88
88
|
log_data(METHOD_SEVERITY_MAP[:warn], 'Logger exception called without exception class.')
|
89
89
|
message = "#{exception.class}: #{exception.inspect} #{param_message}"
|
90
|
-
with_extra_fields(DATA =>
|
90
|
+
with_extra_fields(DATA => param_data || {}) { log_data(log_level, message) }
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
@@ -29,8 +29,8 @@ module Lorekeeper
|
|
29
29
|
|
30
30
|
def write(*args); call_loggers(:write, *args); end
|
31
31
|
|
32
|
-
def respond_to?(method,
|
33
|
-
@loggers.all? { |logger| logger.respond_to?(method,
|
32
|
+
def respond_to?(method, include_all=false)
|
33
|
+
@loggers.all? { |logger| logger.respond_to?(method, include_all) }
|
34
34
|
end
|
35
35
|
|
36
36
|
def call_loggers(method, *args, &block)
|
@@ -38,7 +38,7 @@ module Lorekeeper
|
|
38
38
|
|
39
39
|
# Extending the logger API with methods error_with_data, etc
|
40
40
|
LOGGING_METHODS.each do |method_name|
|
41
|
-
define_method "#{method_name}_with_data", ->(message_param = nil, data = {}) {
|
41
|
+
define_method :"#{method_name}_with_data", ->(message_param = nil, data = {}) {
|
42
42
|
return true if METHOD_SEVERITY_MAP[method_name] < @level
|
43
43
|
|
44
44
|
log_data(METHOD_SEVERITY_MAP[method_name], "#{message_param}, data: #{data}")
|
data/lib/lorekeeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lorekeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordi Polo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -215,6 +215,7 @@ files:
|
|
215
215
|
- ".gitignore"
|
216
216
|
- ".rspec"
|
217
217
|
- ".rubocop.yml"
|
218
|
+
- ".rubocop_todo.yml"
|
218
219
|
- CHANGELOG.md
|
219
220
|
- Gemfile
|
220
221
|
- LICENSE.txt
|
@@ -234,7 +235,7 @@ homepage: https://github.com/JordiPolo/lorekeeper
|
|
234
235
|
licenses:
|
235
236
|
- MIT
|
236
237
|
metadata: {}
|
237
|
-
post_install_message:
|
238
|
+
post_install_message:
|
238
239
|
rdoc_options: []
|
239
240
|
require_paths:
|
240
241
|
- lib
|
@@ -249,8 +250,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
250
|
- !ruby/object:Gem::Version
|
250
251
|
version: '0'
|
251
252
|
requirements: []
|
252
|
-
rubygems_version: 3.
|
253
|
-
signing_key:
|
253
|
+
rubygems_version: 3.0.3.1
|
254
|
+
signing_key:
|
254
255
|
specification_version: 4
|
255
256
|
summary: Very fast JSON logger
|
256
257
|
test_files: []
|