logging 1.8.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/History.txt +20 -0
- data/README.md +159 -0
- data/Rakefile +9 -5
- data/examples/appenders.rb +0 -4
- data/examples/layouts.rb +1 -8
- data/examples/names.rb +4 -4
- data/lib/logging.rb +24 -76
- data/lib/logging/appender.rb +71 -16
- data/lib/logging/appenders.rb +0 -2
- data/lib/logging/appenders/buffering.rb +32 -16
- data/lib/logging/appenders/file.rb +2 -2
- data/lib/logging/appenders/io.rb +1 -1
- data/lib/logging/appenders/rolling_file.rb +228 -165
- data/lib/logging/appenders/string_io.rb +1 -1
- data/lib/logging/appenders/syslog.rb +4 -4
- data/lib/logging/color_scheme.rb +20 -3
- data/lib/logging/diagnostic_context.rb +142 -17
- data/lib/logging/filter.rb +18 -0
- data/lib/logging/filters.rb +4 -0
- data/lib/logging/filters/level.rb +29 -0
- data/lib/logging/layout.rb +2 -2
- data/lib/logging/layouts/parseable.rb +5 -2
- data/lib/logging/layouts/pattern.rb +309 -168
- data/lib/logging/log_event.rb +5 -5
- data/lib/logging/logger.rb +55 -68
- data/lib/logging/repository.rb +24 -39
- data/lib/logging/root_logger.rb +1 -1
- data/lib/logging/utils.rb +4 -65
- data/lib/logging/version.rb +8 -0
- data/lib/rspec/logging_helper.rb +3 -3
- data/logging.gemspec +46 -0
- data/test/appenders/test_buffered_io.rb +29 -0
- data/test/appenders/test_file.rb +2 -2
- data/test/appenders/test_rolling_file.rb +62 -1
- data/test/layouts/test_color_pattern.rb +1 -1
- data/test/layouts/test_json.rb +3 -0
- data/test/layouts/test_pattern.rb +6 -2
- data/test/layouts/test_yaml.rb +4 -1
- data/test/test_appender.rb +56 -0
- data/test/test_filter.rb +33 -0
- data/test/test_layout.rb +4 -8
- data/test/test_log_event.rb +3 -3
- data/test/test_logger.rb +81 -57
- data/test/test_logging.rb +0 -59
- data/test/test_mapped_diagnostic_context.rb +49 -1
- data/test/test_nested_diagnostic_context.rb +16 -1
- data/test/test_repository.rb +24 -32
- data/test/test_utils.rb +14 -50
- metadata +35 -53
- data/README.rdoc +0 -143
- data/data/bad_logging_1.rb +0 -13
- data/data/bad_logging_2.rb +0 -21
- data/data/logging.rb +0 -42
- data/data/logging.yaml +0 -63
- data/data/simple_logging.rb +0 -13
- data/examples/consolidation.rb +0 -83
- data/lib/logging/appenders/email.rb +0 -178
- data/lib/logging/appenders/growl.rb +0 -200
- data/lib/logging/config/configurator.rb +0 -187
- data/lib/logging/config/yaml_configurator.rb +0 -190
- data/lib/logging/stats.rb +0 -277
- data/test/appenders/test_email.rb +0 -170
- data/test/appenders/test_growl.rb +0 -138
- data/test/config/test_configurator.rb +0 -69
- data/test/config/test_yaml_configurator.rb +0 -39
- data/test/test_consolidate.rb +0 -45
- data/test/test_stats.rb +0 -273
- data/version.txt +0 -1
data/test/test_logging.rb
CHANGED
@@ -39,65 +39,6 @@ module TestLogging
|
|
39
39
|
assert_raise(ArgumentError) {::Logging.backtrace 'foo'}
|
40
40
|
end
|
41
41
|
|
42
|
-
def test_configure
|
43
|
-
assert_raise(ArgumentError) {::Logging.configure 'blah.txt'}
|
44
|
-
|
45
|
-
::Logging.configure 'data/logging.yaml'
|
46
|
-
|
47
|
-
names = %w[DEB INF PRT WRN ERR FAT]
|
48
|
-
assert_equal names, ::Logging::LNAMES
|
49
|
-
assert_equal :inspect, ::Logging::OBJ_FORMAT
|
50
|
-
assert_equal 3, ::Logging::Logger.root.level
|
51
|
-
|
52
|
-
# verify the appenders
|
53
|
-
h = ::Logging::Appenders.instance_variable_get :@appenders
|
54
|
-
assert_equal ['logfile', 'stderr'], h.keys.sort
|
55
|
-
|
56
|
-
# start with the File appender
|
57
|
-
logfile = ::Logging::Appenders['logfile']
|
58
|
-
assert_instance_of ::Logging::Appenders::File, logfile
|
59
|
-
assert_equal 0, logfile.level
|
60
|
-
assert_equal ::File.expand_path('tmp/temp.log'), logfile.instance_variable_get(:@fn)
|
61
|
-
|
62
|
-
layout = logfile.layout
|
63
|
-
assert_instance_of ::Logging::Layouts::Pattern, layout
|
64
|
-
assert_equal '[%d] %l %c : %m\\n', layout.pattern
|
65
|
-
assert_equal 'to_s', layout.date_method
|
66
|
-
assert_nil layout.date_pattern
|
67
|
-
|
68
|
-
# and now the Stderr appender
|
69
|
-
stderr = ::Logging::Appenders['stderr']
|
70
|
-
assert_instance_of ::Logging::Appenders::Stderr, stderr
|
71
|
-
assert_equal 0, stderr.level
|
72
|
-
|
73
|
-
layout = stderr.layout
|
74
|
-
assert_instance_of ::Logging::Layouts::Basic, layout
|
75
|
-
|
76
|
-
# verify the loggers
|
77
|
-
h = ::Logging::Repository.instance.instance_variable_get :@h
|
78
|
-
assert_equal 4, h.length
|
79
|
-
|
80
|
-
# mylogger
|
81
|
-
mylogger = ::Logging::Logger['mylogger']
|
82
|
-
assert_equal 0, mylogger.level
|
83
|
-
assert_equal false, mylogger.additive
|
84
|
-
assert_equal false, mylogger.trace
|
85
|
-
|
86
|
-
appenders = mylogger.instance_variable_get :@appenders
|
87
|
-
assert_equal 2, appenders.length
|
88
|
-
assert_equal ['logfile', 'stderr'], appenders.map {|a| a.name}.sort
|
89
|
-
|
90
|
-
# yourlogger
|
91
|
-
yourlogger = ::Logging::Logger['yourlogger']
|
92
|
-
assert_equal 1, yourlogger.level
|
93
|
-
assert_equal true, yourlogger.additive
|
94
|
-
assert_equal false, yourlogger.trace
|
95
|
-
|
96
|
-
appenders = yourlogger.instance_variable_get :@appenders
|
97
|
-
assert_equal 2, appenders.length
|
98
|
-
assert_equal ['logfile', 'stderr'], appenders.map {|a| a.name}.sort
|
99
|
-
end
|
100
|
-
|
101
42
|
def test_logger
|
102
43
|
assert_raise(TypeError) {::Logging.logger []}
|
103
44
|
|
@@ -30,6 +30,48 @@ module TestLogging
|
|
30
30
|
assert_nil Logging.mdc['baz']
|
31
31
|
end
|
32
32
|
|
33
|
+
def test_context_update
|
34
|
+
Logging.mdc.update(:foo => 'bar', :baz => 'buz')
|
35
|
+
assert_equal 'bar', Logging.mdc[:foo]
|
36
|
+
assert_equal 'buz', Logging.mdc[:baz]
|
37
|
+
|
38
|
+
Logging.mdc.update('foo' => 1, 'baz' => 2)
|
39
|
+
assert_equal 1, Logging.mdc[:foo]
|
40
|
+
assert_equal 2, Logging.mdc[:baz]
|
41
|
+
|
42
|
+
assert_equal 1, Logging.mdc.stack.length
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_context_pushing
|
46
|
+
assert Logging.mdc.context.empty?
|
47
|
+
assert_equal 1, Logging.mdc.stack.length
|
48
|
+
|
49
|
+
Logging.mdc.push(:foo => 'bar', :baz => 'buz')
|
50
|
+
assert_equal 'bar', Logging.mdc[:foo]
|
51
|
+
assert_equal 'buz', Logging.mdc[:baz]
|
52
|
+
assert_equal 2, Logging.mdc.stack.length
|
53
|
+
|
54
|
+
Logging.mdc.push(:foo => 1, :baz => 2, :foobar => 3)
|
55
|
+
assert_equal 1, Logging.mdc[:foo]
|
56
|
+
assert_equal 2, Logging.mdc[:baz]
|
57
|
+
assert_equal 3, Logging.mdc[:foobar]
|
58
|
+
assert_equal 3, Logging.mdc.stack.length
|
59
|
+
|
60
|
+
Logging.mdc.pop
|
61
|
+
assert_equal 'bar', Logging.mdc[:foo]
|
62
|
+
assert_equal 'buz', Logging.mdc[:baz]
|
63
|
+
assert_nil Logging.mdc[:foobar]
|
64
|
+
assert_equal 2, Logging.mdc.stack.length
|
65
|
+
|
66
|
+
Logging.mdc.pop
|
67
|
+
assert Logging.mdc.context.empty?
|
68
|
+
assert_equal 1, Logging.mdc.stack.length
|
69
|
+
|
70
|
+
Logging.mdc.pop
|
71
|
+
assert Logging.mdc.context.empty?
|
72
|
+
assert_equal 1, Logging.mdc.stack.length
|
73
|
+
end
|
74
|
+
|
33
75
|
def test_thread_uniqueness
|
34
76
|
Logging.mdc['foo'] = 'bar'
|
35
77
|
Logging.mdc['baz'] = 'buz'
|
@@ -56,18 +98,24 @@ module TestLogging
|
|
56
98
|
def test_thread_inheritance
|
57
99
|
Logging.mdc['foo'] = 'bar'
|
58
100
|
Logging.mdc['baz'] = 'buz'
|
101
|
+
Logging.mdc.push(:foo => 1, 'foobar' => 'something else')
|
59
102
|
|
60
103
|
t = Thread.new(Logging.mdc.context) { |context|
|
61
104
|
sleep
|
62
105
|
|
63
106
|
assert_not_equal context.object_id, Logging.mdc.context.object_id
|
64
107
|
|
65
|
-
assert_equal
|
108
|
+
assert_equal 1, Logging.mdc['foo']
|
66
109
|
assert_equal 'buz', Logging.mdc['baz']
|
110
|
+
assert_equal 'something else', Logging.mdc['foobar']
|
67
111
|
assert_nil Logging.mdc['unique']
|
112
|
+
|
113
|
+
assert_equal 1, Logging.mdc.stack.length
|
68
114
|
}
|
69
115
|
|
70
116
|
Thread.pass until t.status == 'sleep'
|
117
|
+
|
118
|
+
Logging.mdc.pop
|
71
119
|
Logging.mdc['unique'] = 'value'
|
72
120
|
|
73
121
|
t.run
|
@@ -30,6 +30,22 @@ module TestLogging
|
|
30
30
|
assert ary.empty?
|
31
31
|
end
|
32
32
|
|
33
|
+
def test_push_block
|
34
|
+
ary = Logging.ndc.context
|
35
|
+
|
36
|
+
Logging.ndc.push('first context') do
|
37
|
+
assert_equal 'first context', Logging.ndc.peek
|
38
|
+
end
|
39
|
+
assert ary.empty?
|
40
|
+
|
41
|
+
Logging.ndc.push('first context') do
|
42
|
+
assert_raise(ZeroDivisionError) do
|
43
|
+
Logging.ndc.push('first context') { 1/0 }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
assert ary.empty?
|
47
|
+
end
|
48
|
+
|
33
49
|
def test_clear
|
34
50
|
ary = Logging.ndc.context
|
35
51
|
assert ary.empty?
|
@@ -40,7 +56,6 @@ module TestLogging
|
|
40
56
|
|
41
57
|
Logging.ndc.clear
|
42
58
|
assert_nil Logging.ndc.peek
|
43
|
-
assert ary.empty?
|
44
59
|
end
|
45
60
|
|
46
61
|
def test_thread_uniqueness
|
data/test/test_repository.rb
CHANGED
@@ -56,6 +56,30 @@ module TestLogging
|
|
56
56
|
assert @repo.has_logger?('A::B')
|
57
57
|
end
|
58
58
|
|
59
|
+
def test_delete
|
60
|
+
%w(A A::B A::C A::B::D).each do |name|
|
61
|
+
::Logging::Logger.new(name)
|
62
|
+
end
|
63
|
+
|
64
|
+
assert @repo.has_logger?('A')
|
65
|
+
assert @repo.has_logger?('A::B')
|
66
|
+
assert @repo.has_logger?('A::C')
|
67
|
+
assert @repo.has_logger?('A::B::D')
|
68
|
+
|
69
|
+
assert_raise(RuntimeError) {@repo.delete :root}
|
70
|
+
assert_raise(KeyError) {@repo.delete 'Does::Not::Exist'}
|
71
|
+
|
72
|
+
@repo.delete 'A'
|
73
|
+
assert !@repo.has_logger?('A')
|
74
|
+
assert_equal @repo[:root], @repo['A::B'].parent
|
75
|
+
assert_equal @repo[:root], @repo['A::C'].parent
|
76
|
+
assert_equal @repo['A::B'], @repo['A::B::D'].parent
|
77
|
+
|
78
|
+
@repo.delete 'A::B'
|
79
|
+
assert !@repo.has_logger?('A::B')
|
80
|
+
assert_equal @repo[:root], @repo['A::B::D'].parent
|
81
|
+
end
|
82
|
+
|
59
83
|
def test_parent
|
60
84
|
%w(A A::B A::B::C::D A::B::C::E A::B::C::F).each do |name|
|
61
85
|
::Logging::Logger.new(name)
|
@@ -120,38 +144,6 @@ module TestLogging
|
|
120
144
|
assert_equal 'blah', @repo.to_key(:blah)
|
121
145
|
end
|
122
146
|
|
123
|
-
def test_add_master
|
124
|
-
ary = @repo.instance_variable_get(:@masters)
|
125
|
-
assert ary.empty?
|
126
|
-
|
127
|
-
@repo.add_master 'root'
|
128
|
-
assert_equal [:root], ary
|
129
|
-
|
130
|
-
@repo.add_master Object, 'Foo'
|
131
|
-
assert_equal [:root, 'Object', 'Foo'], ary
|
132
|
-
end
|
133
|
-
|
134
|
-
def test_master_for
|
135
|
-
assert_nil @repo.master_for('root')
|
136
|
-
assert_nil @repo.master_for('Foo::Bar::Baz')
|
137
|
-
|
138
|
-
@repo.add_master('Foo')
|
139
|
-
assert_equal 'Foo', @repo.master_for('Foo')
|
140
|
-
assert_equal 'Foo', @repo.master_for('Foo::Bar::Baz')
|
141
|
-
|
142
|
-
@repo.add_master('Foo::Bar::Baz')
|
143
|
-
assert_equal 'Foo', @repo.master_for('Foo')
|
144
|
-
assert_equal 'Foo', @repo.master_for('Foo::Bar')
|
145
|
-
assert_equal 'Foo::Bar::Baz', @repo.master_for('Foo::Bar::Baz')
|
146
|
-
assert_equal 'Foo::Bar::Baz', @repo.master_for('Foo::Bar::Baz::Buz')
|
147
|
-
|
148
|
-
assert_nil @repo.master_for('Bar::Baz::Buz')
|
149
|
-
@repo.add_master 'root'
|
150
|
-
assert_equal :root, @repo.master_for('Bar::Baz::Buz')
|
151
|
-
assert_equal 'Foo', @repo.master_for('Foo::Bar')
|
152
|
-
assert_equal 'Foo::Bar::Baz', @repo.master_for('Foo::Bar::Baz::Buz')
|
153
|
-
end
|
154
|
-
|
155
147
|
end # class TestRepository
|
156
148
|
end # module TestLogging
|
157
149
|
|
data/test/test_utils.rb
CHANGED
@@ -5,82 +5,46 @@ module TestLogging
|
|
5
5
|
|
6
6
|
class TestUtils < Test::Unit::TestCase
|
7
7
|
|
8
|
-
def
|
9
|
-
opts = {
|
10
|
-
:foo => 'foo_value',
|
11
|
-
'bar' => 'bar_value',
|
12
|
-
'one' => '1',
|
13
|
-
:two => '2',
|
14
|
-
:three => 3.0
|
15
|
-
}
|
16
|
-
|
17
|
-
assert_equal('foo_value', opts.getopt(:foo))
|
18
|
-
assert_equal('foo_value', opts.getopt('foo'))
|
19
|
-
assert_equal(:foo_value, opts.getopt(:foo, :as => Symbol))
|
20
|
-
|
21
|
-
assert_equal('bar_value', opts.getopt(:bar))
|
22
|
-
assert_equal('bar_value', opts.getopt('bar'))
|
23
|
-
|
24
|
-
assert_equal('1', opts.getopt(:one))
|
25
|
-
assert_equal(1, opts.getopt('one', :as => Integer))
|
26
|
-
assert_instance_of(Float, opts.getopt('one', :as => Float))
|
27
|
-
|
28
|
-
assert_equal('2', opts.getopt(:two))
|
29
|
-
assert_equal(['2'], opts.getopt(:two, :as => Array))
|
30
|
-
|
31
|
-
assert_equal(3.0, opts.getopt(:three))
|
32
|
-
assert_equal('3.0', opts.getopt('three', :as => String))
|
33
|
-
|
34
|
-
assert_equal(nil, opts.getopt(:baz))
|
35
|
-
assert_equal('default', opts.getopt('baz', 'default'))
|
36
|
-
assert_equal(:default, opts.getopt(:key, 'default', :as => Symbol))
|
37
|
-
assert_equal(['default'], opts.getopt('key', 'default', :as => Array))
|
38
|
-
|
39
|
-
assert_equal(3.0, opts.getopt(:three, :as => Object))
|
40
|
-
|
41
|
-
assert_nil opts.getopt(:key, :as => Symbol)
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_string_reduce
|
8
|
+
def test_string_shrink
|
45
9
|
str = 'this is the foobar string'
|
46
10
|
len = str.length
|
47
11
|
|
48
|
-
r = str.
|
12
|
+
r = str.shrink(len + 1)
|
49
13
|
assert_same str, r
|
50
14
|
|
51
|
-
r = str.
|
15
|
+
r = str.shrink(len)
|
52
16
|
assert_same str, r
|
53
17
|
|
54
|
-
r = str.
|
18
|
+
r = str.shrink(len - 1)
|
55
19
|
assert_equal 'this is the...bar string', r
|
56
20
|
|
57
|
-
r = str.
|
21
|
+
r = str.shrink(len - 10)
|
58
22
|
assert_equal 'this i...string', r
|
59
23
|
|
60
|
-
r = str.
|
24
|
+
r = str.shrink(4)
|
61
25
|
assert_equal 't...', r
|
62
26
|
|
63
|
-
r = str.
|
27
|
+
r = str.shrink(3)
|
64
28
|
assert_equal '...', r
|
65
29
|
|
66
|
-
r = str.
|
30
|
+
r = str.shrink(0)
|
67
31
|
assert_equal '...', r
|
68
32
|
|
69
|
-
assert_raises(ArgumentError) { str.
|
33
|
+
assert_raises(ArgumentError) { str.shrink(-1) }
|
70
34
|
|
71
|
-
r = str.
|
35
|
+
r = str.shrink(len - 1, '##')
|
72
36
|
assert_equal 'this is the##obar string', r
|
73
37
|
|
74
|
-
r = str.
|
38
|
+
r = str.shrink(len - 10, '##')
|
75
39
|
assert_equal 'this is##string', r
|
76
40
|
|
77
|
-
r = str.
|
41
|
+
r = str.shrink(4, '##')
|
78
42
|
assert_equal 't##g', r
|
79
43
|
|
80
|
-
r = str.
|
44
|
+
r = str.shrink(3, '##')
|
81
45
|
assert_equal 't##', r
|
82
46
|
|
83
|
-
r = str.
|
47
|
+
r = str.shrink(0, '##')
|
84
48
|
assert_equal '##', r
|
85
49
|
end
|
86
50
|
|
metadata
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: little-plugger
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.1
|
19
|
+
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.1
|
26
|
+
version: '1.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: '1.10'
|
34
34
|
type: :runtime
|
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: 1.
|
40
|
+
version: '1.10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: flexmock
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.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
54
|
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bones-git
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.3
|
61
|
+
version: '1.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.3
|
68
|
+
version: '1.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bones
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.8.
|
75
|
+
version: 3.8.3
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.8.
|
82
|
+
version: 3.8.3
|
83
83
|
description: |-
|
84
84
|
Logging is a flexible logging library for use in Ruby programs based on the
|
85
85
|
design of Java's log4j library. It features a hierarchical logging system,
|
@@ -90,22 +90,15 @@ executables: []
|
|
90
90
|
extensions: []
|
91
91
|
extra_rdoc_files:
|
92
92
|
- History.txt
|
93
|
-
- README.rdoc
|
94
93
|
files:
|
95
|
-
- .gitignore
|
96
|
-
- .travis.yml
|
94
|
+
- ".gitignore"
|
95
|
+
- ".travis.yml"
|
97
96
|
- History.txt
|
98
|
-
- README.
|
97
|
+
- README.md
|
99
98
|
- Rakefile
|
100
|
-
- data/bad_logging_1.rb
|
101
|
-
- data/bad_logging_2.rb
|
102
|
-
- data/logging.rb
|
103
|
-
- data/logging.yaml
|
104
|
-
- data/simple_logging.rb
|
105
99
|
- examples/appenders.rb
|
106
100
|
- examples/classes.rb
|
107
101
|
- examples/colorization.rb
|
108
|
-
- examples/consolidation.rb
|
109
102
|
- examples/custom_log_levels.rb
|
110
103
|
- examples/fork.rb
|
111
104
|
- examples/formatting.rb
|
@@ -122,17 +115,16 @@ files:
|
|
122
115
|
- lib/logging/appenders.rb
|
123
116
|
- lib/logging/appenders/buffering.rb
|
124
117
|
- lib/logging/appenders/console.rb
|
125
|
-
- lib/logging/appenders/email.rb
|
126
118
|
- lib/logging/appenders/file.rb
|
127
|
-
- lib/logging/appenders/growl.rb
|
128
119
|
- lib/logging/appenders/io.rb
|
129
120
|
- lib/logging/appenders/rolling_file.rb
|
130
121
|
- lib/logging/appenders/string_io.rb
|
131
122
|
- lib/logging/appenders/syslog.rb
|
132
123
|
- lib/logging/color_scheme.rb
|
133
|
-
- lib/logging/config/configurator.rb
|
134
|
-
- lib/logging/config/yaml_configurator.rb
|
135
124
|
- lib/logging/diagnostic_context.rb
|
125
|
+
- lib/logging/filter.rb
|
126
|
+
- lib/logging/filters.rb
|
127
|
+
- lib/logging/filters/level.rb
|
136
128
|
- lib/logging/layout.rb
|
137
129
|
- lib/logging/layouts.rb
|
138
130
|
- lib/logging/layouts/basic.rb
|
@@ -144,24 +136,21 @@ files:
|
|
144
136
|
- lib/logging/rails_compat.rb
|
145
137
|
- lib/logging/repository.rb
|
146
138
|
- lib/logging/root_logger.rb
|
147
|
-
- lib/logging/stats.rb
|
148
139
|
- lib/logging/utils.rb
|
140
|
+
- lib/logging/version.rb
|
149
141
|
- lib/rspec/logging_helper.rb
|
150
142
|
- lib/spec/logging_helper.rb
|
143
|
+
- logging.gemspec
|
151
144
|
- script/bootstrap
|
152
145
|
- test/appenders/test_buffered_io.rb
|
153
146
|
- test/appenders/test_console.rb
|
154
|
-
- test/appenders/test_email.rb
|
155
147
|
- test/appenders/test_file.rb
|
156
|
-
- test/appenders/test_growl.rb
|
157
148
|
- test/appenders/test_io.rb
|
158
149
|
- test/appenders/test_periodic_flushing.rb
|
159
150
|
- test/appenders/test_rolling_file.rb
|
160
151
|
- test/appenders/test_string_io.rb
|
161
152
|
- test/appenders/test_syslog.rb
|
162
153
|
- test/benchmark.rb
|
163
|
-
- test/config/test_configurator.rb
|
164
|
-
- test/config/test_yaml_configurator.rb
|
165
154
|
- test/layouts/test_basic.rb
|
166
155
|
- test/layouts/test_color_pattern.rb
|
167
156
|
- test/layouts/test_json.rb
|
@@ -170,7 +159,7 @@ files:
|
|
170
159
|
- test/setup.rb
|
171
160
|
- test/test_appender.rb
|
172
161
|
- test/test_color_scheme.rb
|
173
|
-
- test/
|
162
|
+
- test/test_filter.rb
|
174
163
|
- test/test_layout.rb
|
175
164
|
- test/test_log_event.rb
|
176
165
|
- test/test_logger.rb
|
@@ -180,47 +169,41 @@ files:
|
|
180
169
|
- test/test_proxy.rb
|
181
170
|
- test/test_repository.rb
|
182
171
|
- test/test_root_logger.rb
|
183
|
-
- test/test_stats.rb
|
184
172
|
- test/test_utils.rb
|
185
|
-
- version.txt
|
186
173
|
homepage: http://rubygems.org/gems/logging
|
187
174
|
licenses: []
|
188
175
|
metadata: {}
|
189
176
|
post_install_message:
|
190
177
|
rdoc_options:
|
191
|
-
- --main
|
192
|
-
- README.
|
178
|
+
- "--main"
|
179
|
+
- README.md
|
193
180
|
require_paths:
|
194
181
|
- lib
|
195
182
|
required_ruby_version: !ruby/object:Gem::Requirement
|
196
183
|
requirements:
|
197
|
-
- -
|
184
|
+
- - ">="
|
198
185
|
- !ruby/object:Gem::Version
|
199
186
|
version: '0'
|
200
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
188
|
requirements:
|
202
|
-
- -
|
189
|
+
- - ">="
|
203
190
|
- !ruby/object:Gem::Version
|
204
191
|
version: '0'
|
205
192
|
requirements: []
|
206
193
|
rubyforge_project: logging
|
207
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.2.2
|
208
195
|
signing_key:
|
209
196
|
specification_version: 4
|
210
197
|
summary: A flexible and extendable logging library for Ruby
|
211
198
|
test_files:
|
212
199
|
- test/appenders/test_buffered_io.rb
|
213
200
|
- test/appenders/test_console.rb
|
214
|
-
- test/appenders/test_email.rb
|
215
201
|
- test/appenders/test_file.rb
|
216
|
-
- test/appenders/test_growl.rb
|
217
202
|
- test/appenders/test_io.rb
|
218
203
|
- test/appenders/test_periodic_flushing.rb
|
219
204
|
- test/appenders/test_rolling_file.rb
|
220
205
|
- test/appenders/test_string_io.rb
|
221
206
|
- test/appenders/test_syslog.rb
|
222
|
-
- test/config/test_configurator.rb
|
223
|
-
- test/config/test_yaml_configurator.rb
|
224
207
|
- test/layouts/test_basic.rb
|
225
208
|
- test/layouts/test_color_pattern.rb
|
226
209
|
- test/layouts/test_json.rb
|
@@ -228,7 +211,7 @@ test_files:
|
|
228
211
|
- test/layouts/test_yaml.rb
|
229
212
|
- test/test_appender.rb
|
230
213
|
- test/test_color_scheme.rb
|
231
|
-
- test/
|
214
|
+
- test/test_filter.rb
|
232
215
|
- test/test_layout.rb
|
233
216
|
- test/test_log_event.rb
|
234
217
|
- test/test_logger.rb
|
@@ -238,5 +221,4 @@ test_files:
|
|
238
221
|
- test/test_proxy.rb
|
239
222
|
- test/test_repository.rb
|
240
223
|
- test/test_root_logger.rb
|
241
|
-
- test/test_stats.rb
|
242
224
|
- test/test_utils.rb
|