hatchet 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/RELEASE.md +5 -0
- data/lib/hatchet/level_manager.rb +5 -3
- data/lib/hatchet/version.rb +1 -1
- data/spec/level_manager_spec.rb +14 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e793530225b72cad969ca6ff304f764b79342362
|
4
|
+
data.tar.gz: 31f388e0a9b3304f57c9c9bb0ab0c372aef1fdd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d690faeaa1369d6d29b9fc78c194793de3f22124a1d287f21dba0ac39bc55a03ad8fc158b912dcb1cc06073e628fd0b10a7ebfdda7d54055694251487983d61
|
7
|
+
data.tar.gz: 30bde7326ac9c50ca3a885c49487647aafbb93915418645fbed0b2099553fbf030f015cd210db34c29edf6884a4c85bb7033c4b58e910d6c82f0250f657a89a5
|
data/RELEASE.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Release notes
|
2
2
|
|
3
|
+
## 0.2.9
|
4
|
+
|
5
|
+
* Fixed a bug where if you specified appender-specific log levels without
|
6
|
+
providing a default to fall back to a `SystemStackError` would be raised
|
7
|
+
|
3
8
|
## 0.2.8
|
4
9
|
|
5
10
|
* Added the ability to limit the number of lines of backtrace included by the
|
@@ -74,11 +74,13 @@ module Hatchet
|
|
74
74
|
#
|
75
75
|
def levels_cache
|
76
76
|
@_levels_cache ||= begin
|
77
|
-
|
77
|
+
new_cache = Hash.new do |hash, key|
|
78
78
|
hash[key] = level_for_context(key)
|
79
79
|
end
|
80
|
-
self.levels.each { |k, v|
|
81
|
-
|
80
|
+
self.levels.each { |k, v| new_cache[k] = v }
|
81
|
+
# Ensure there is always a default fallback
|
82
|
+
new_cache[nil] = :info unless new_cache.include?(nil)
|
83
|
+
new_cache
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|
data/lib/hatchet/version.rb
CHANGED
data/spec/level_manager_spec.rb
CHANGED
@@ -8,6 +8,20 @@ describe LevelManager do
|
|
8
8
|
@manager.extend LevelManager
|
9
9
|
end
|
10
10
|
|
11
|
+
describe 'setting no default level' do
|
12
|
+
before do
|
13
|
+
# nothing
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'has info messages enabled for any context' do
|
17
|
+
assert @manager.enabled?(:info, 'Foo::Bar')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'has debug messages disabled for any context' do
|
21
|
+
refute @manager.enabled?(:debug, 'Foo::Bar')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
11
25
|
describe 'setting a default level of info' do
|
12
26
|
before do
|
13
27
|
@manager.level :info
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hatchet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garry Shutler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Logging library that provides the ability to add class/module specific
|
14
14
|
filters
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.
|
76
|
+
rubygems_version: 2.4.1
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Logging library that provides the ability to add class/module specific filters
|