logster 2.7.0 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/logster/base_store.rb +1 -1
- data/lib/logster/version.rb +1 -1
- data/test/logster/test_base_store.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e2fb360e66b19d26e80b991ce21ffea457434700d7610c10e68e429f94dbf42
|
4
|
+
data.tar.gz: f26c5e4b6d19284fa2e3ed2de99b4abe73c4c1a4c64afdf151c537d3c8dfbd1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27fb6774bbe4db2d727b760273fe14c005719e1dc8ff1338cce78fbcae9cdd624baf420302903c8cef0e7f073713e72e9002312fe143faa26e3090431152bd99
|
7
|
+
data.tar.gz: cf1474a67c00acc807a297b496ba47a1051d316a5b19ae2c551d30d5ba12a04602124ab58ffc5077b0a4931ab3779973e04cb6536dccfc0ee1de3f115ed621c0
|
data/CHANGELOG.md
CHANGED
data/lib/logster/base_store.rb
CHANGED
@@ -156,7 +156,7 @@ module Logster
|
|
156
156
|
msg = truncate_message(msg)
|
157
157
|
message = Logster::Message.new(severity, progname, msg, opts[:timestamp], count: opts[:count])
|
158
158
|
|
159
|
-
env = opts[:env] || {}
|
159
|
+
env = opts[:env]&.dup || {}
|
160
160
|
backtrace = opts[:backtrace]
|
161
161
|
if Hash === env && env[:backtrace]
|
162
162
|
# Special - passing backtrace through env
|
data/lib/logster/version.rb
CHANGED
@@ -176,4 +176,16 @@ class TestBaseStore < Minitest::Test
|
|
176
176
|
ensure
|
177
177
|
Logster.config.maximum_message_length = orig
|
178
178
|
end
|
179
|
+
|
180
|
+
def test_chained_loggers_shouldnt_mutate_env_passed_to_them
|
181
|
+
logger = Logster::Logger.new(@store)
|
182
|
+
other_store = Logster::TestStore.new
|
183
|
+
other_logger = Logster::Logger.new(other_store)
|
184
|
+
logger.chain(other_logger)
|
185
|
+
logger.add(Logger::WARN, "this is warning", '', { env: { backtrace: '11' } })
|
186
|
+
[@store, other_store].each do |store|
|
187
|
+
assert_equal('11', store.reported.first.backtrace)
|
188
|
+
refute_includes(store.reported.first.env.keys.map(&:to_sym), :backtrace)
|
189
|
+
end
|
190
|
+
end
|
179
191
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UI for viewing logs in Rack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02
|
11
|
+
date: 2020-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|