loggability 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +4 -0
- data/.gemtest +0 -0
- data/ChangeLog +9353 -0
- data/History.rdoc +4 -0
- data/Manifest.txt +19 -0
- data/README.rdoc +200 -0
- data/Rakefile +49 -0
- data/bin/loggability +3 -0
- data/lib/loggability.rb +223 -0
- data/lib/loggability/constants.rb +26 -0
- data/lib/loggability/formatter.rb +89 -0
- data/lib/loggability/formatter/color.rb +52 -0
- data/lib/loggability/formatter/default.rb +21 -0
- data/lib/loggability/formatter/html.rb +76 -0
- data/lib/loggability/logger.rb +244 -0
- data/spec/lib/helpers.rb +42 -0
- data/spec/loggability/formatter/color_spec.rb +38 -0
- data/spec/loggability/formatter/html_spec.rb +45 -0
- data/spec/loggability/formatter_spec.rb +50 -0
- data/spec/loggability/logger_spec.rb +149 -0
- data/spec/loggability_spec.rb +84 -0
- metadata +220 -0
- metadata.gz.sig +0 -0
data/spec/lib/helpers.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# vim: set nosta noet ts=4 sw=4:
|
3
|
+
# encoding: utf-8
|
4
|
+
|
5
|
+
BEGIN {
|
6
|
+
require 'pathname'
|
7
|
+
basedir = Pathname.new( __FILE__ ).dirname.parent.parent
|
8
|
+
|
9
|
+
libdir = basedir + "lib"
|
10
|
+
|
11
|
+
$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
|
12
|
+
}
|
13
|
+
|
14
|
+
# SimpleCov test coverage reporting; enable this using the :coverage rake task
|
15
|
+
if ENV['COVERAGE']
|
16
|
+
$stderr.puts "\n\n>>> Enabling coverage report.\n\n"
|
17
|
+
require 'simplecov'
|
18
|
+
SimpleCov.start do
|
19
|
+
add_filter 'spec'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
require 'loggability' unless defined?( Loggability )
|
25
|
+
|
26
|
+
#
|
27
|
+
# Some helper functions for RSpec specifications
|
28
|
+
#
|
29
|
+
module Loggability::SpecHelpers
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
end # Loggability::SpecHelpers
|
34
|
+
|
35
|
+
|
36
|
+
### Mock with RSpec
|
37
|
+
RSpec.configure do |c|
|
38
|
+
c.mock_with( :rspec )
|
39
|
+
|
40
|
+
c.include( Loggability::SpecHelpers )
|
41
|
+
end
|
42
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- rspec -*-
|
2
|
+
|
3
|
+
BEGIN {
|
4
|
+
require 'pathname'
|
5
|
+
basedir = Pathname( __FILE__ ).dirname.parent.parent.parent
|
6
|
+
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
|
7
|
+
}
|
8
|
+
|
9
|
+
require 'tempfile'
|
10
|
+
require 'rspec'
|
11
|
+
require 'spec/lib/helpers'
|
12
|
+
require 'loggability/logger'
|
13
|
+
require 'loggability/formatter'
|
14
|
+
require 'loggability/formatter/color'
|
15
|
+
|
16
|
+
|
17
|
+
describe Loggability::Formatter::Color do
|
18
|
+
|
19
|
+
before( :all ) do
|
20
|
+
@original_term = ENV['TERM']
|
21
|
+
ENV['TERM'] = 'xterm-color'
|
22
|
+
end
|
23
|
+
|
24
|
+
after( :all ) do
|
25
|
+
ENV['TERM'] = @original_term
|
26
|
+
end
|
27
|
+
|
28
|
+
before( :each ) do
|
29
|
+
@formatter = described_class.new
|
30
|
+
end
|
31
|
+
|
32
|
+
it "formats messages with ANSI color" do
|
33
|
+
@formatter.call( 'INFO', Time.at(1336286481), nil, "Foom." ).
|
34
|
+
should include( "-- \e[37mFoom.\e[0m\n" )
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- rspec -*-
|
2
|
+
|
3
|
+
BEGIN {
|
4
|
+
require 'pathname'
|
5
|
+
basedir = Pathname( __FILE__ ).dirname.parent.parent.parent
|
6
|
+
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
|
7
|
+
}
|
8
|
+
|
9
|
+
require 'tempfile'
|
10
|
+
require 'rspec'
|
11
|
+
require 'spec/lib/helpers'
|
12
|
+
require 'loggability/logger'
|
13
|
+
require 'loggability/formatter'
|
14
|
+
require 'loggability/formatter/html'
|
15
|
+
|
16
|
+
|
17
|
+
describe Loggability::Formatter::HTML do
|
18
|
+
|
19
|
+
subject { described_class.new }
|
20
|
+
|
21
|
+
it "formats messages as HTML" do
|
22
|
+
subject.call( 'INFO', Time.at(1336286481), nil, "Foom." ).should =~
|
23
|
+
%r{<span class="log-message-text">Foom.</span>}i
|
24
|
+
end
|
25
|
+
|
26
|
+
it "formats exceptions into useful messages" do
|
27
|
+
msg = nil
|
28
|
+
|
29
|
+
begin
|
30
|
+
raise ArgumentError, "invalid argument"
|
31
|
+
rescue => err
|
32
|
+
msg = subject.call( 'INFO', Time.at(1336286481), nil, err )
|
33
|
+
end
|
34
|
+
|
35
|
+
msg.should =~ %r{<span class=\"log-exc\">ArgumentError</span>}i
|
36
|
+
msg.should =~ %r{<span class=\"log-exc-message\">invalid argument</span>}i
|
37
|
+
msg.should =~ %r{ from <span class=\"log-exc-firstframe\">}i
|
38
|
+
end
|
39
|
+
|
40
|
+
it "formats regular objects into useful messages" do
|
41
|
+
subject.call( 'INFO', Time.at(1336286481), nil, Object.new ).should =~
|
42
|
+
%r{<span class=\"log-message-text\">#<Object:0x\p{XDigit}+></span>}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# -*- rspec -*-
|
2
|
+
|
3
|
+
BEGIN {
|
4
|
+
require 'pathname'
|
5
|
+
basedir = Pathname( __FILE__ ).dirname.parent.parent
|
6
|
+
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
|
7
|
+
}
|
8
|
+
|
9
|
+
require 'tempfile'
|
10
|
+
require 'rspec'
|
11
|
+
require 'spec/lib/helpers'
|
12
|
+
require 'loggability/logger'
|
13
|
+
require 'loggability/formatter'
|
14
|
+
require 'loggability/formatter/default'
|
15
|
+
|
16
|
+
|
17
|
+
describe Loggability::Formatter do
|
18
|
+
|
19
|
+
it "loads plugins out of loggability/formatter" do
|
20
|
+
Loggability::Formatter.derivative_dirs.should == ['loggability/formatter']
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
it "formats messages with the pattern it's constructed with" do
|
25
|
+
formatter = Loggability::Formatter.new( '[%5$s] %7$s' )
|
26
|
+
formatter.call( 'INFO', Time.at(1336286481), nil, 'Foom.' ).should =~
|
27
|
+
/\[INFO\] Foom./
|
28
|
+
end
|
29
|
+
|
30
|
+
it "formats exceptions into useful messages" do
|
31
|
+
formatter = Loggability::Formatter.new( '[%5$s] %7$s' )
|
32
|
+
msg = nil
|
33
|
+
|
34
|
+
begin
|
35
|
+
raise ArgumentError, "invalid argument"
|
36
|
+
rescue => err
|
37
|
+
msg = formatter.call( 'INFO', Time.at(1336286481), nil, err )
|
38
|
+
end
|
39
|
+
|
40
|
+
msg.should =~ /\[INFO\] ArgumentError: invalid argument/i
|
41
|
+
end
|
42
|
+
|
43
|
+
it "formats regular objects into useful messages" do
|
44
|
+
formatter = Loggability::Formatter.new( '[%5$s] %7$s' )
|
45
|
+
formatter.call( 'INFO', Time.at(1336286481), nil, Object.new ).should =~
|
46
|
+
/\[INFO\] #<Object:0x\p{XDigit}+>/i
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
@@ -0,0 +1,149 @@
|
|
1
|
+
# -*- rspec -*-
|
2
|
+
|
3
|
+
BEGIN {
|
4
|
+
require 'pathname'
|
5
|
+
basedir = Pathname( __FILE__ ).dirname.parent.parent
|
6
|
+
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
|
7
|
+
}
|
8
|
+
|
9
|
+
require 'tempfile'
|
10
|
+
require 'rspec'
|
11
|
+
require 'spec/lib/helpers'
|
12
|
+
require 'loggability/logger'
|
13
|
+
require 'loggability/formatter'
|
14
|
+
require 'loggability/formatter/default'
|
15
|
+
|
16
|
+
|
17
|
+
describe Loggability::Logger do
|
18
|
+
|
19
|
+
before( :all ) do
|
20
|
+
@original_debug_level = $DEBUG
|
21
|
+
$DEBUG = false
|
22
|
+
end
|
23
|
+
|
24
|
+
after( :all ) do
|
25
|
+
$DEBUG = @original_debug_level
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
before( :each ) do
|
30
|
+
@logger = described_class.new
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
describe "severity level API" do
|
35
|
+
|
36
|
+
it "defaults to :warn level" do
|
37
|
+
@logger.level.should == :warn
|
38
|
+
end
|
39
|
+
|
40
|
+
it "defaults to :debug level when $DEBUG is true" do
|
41
|
+
begin
|
42
|
+
$DEBUG = true
|
43
|
+
described_class.new.level.should == :debug
|
44
|
+
ensure
|
45
|
+
$DEBUG = false
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
it "allows its levels to be set with integers like Logger" do
|
50
|
+
@logger.level = Logger::DEBUG
|
51
|
+
@logger.level.should == :debug
|
52
|
+
end
|
53
|
+
|
54
|
+
it "allows its levels to be set with Symbolic level names" do
|
55
|
+
@logger.level = :info
|
56
|
+
@logger.level.should == :info
|
57
|
+
end
|
58
|
+
|
59
|
+
it "allows its levels to be set with Stringish level names" do
|
60
|
+
@logger.level = 'fatal'
|
61
|
+
@logger.level.should == :fatal
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
describe "log device API" do
|
68
|
+
|
69
|
+
it "logs to STDERR by default" do
|
70
|
+
@logger.logdev.dev.should be( $stderr )
|
71
|
+
end
|
72
|
+
|
73
|
+
it "can be told to log to a file" do
|
74
|
+
tmpfile = Tempfile.new( 'loggability-device-spec' )
|
75
|
+
@logger.output_to( tmpfile.path )
|
76
|
+
@logger.logdev.dev.should be_a( File )
|
77
|
+
end
|
78
|
+
|
79
|
+
it "supports log-rotation arguments for logfiles" do
|
80
|
+
tmpfile = Tempfile.new( 'loggability-device-spec' )
|
81
|
+
@logger.output_to( tmpfile.path, 5, 125000 )
|
82
|
+
@logger.logdev.dev.should be_a( File )
|
83
|
+
@logger.logdev.filename.should == tmpfile.path
|
84
|
+
@logger.logdev.instance_variable_get( :@shift_age ).should == 5
|
85
|
+
@logger.logdev.instance_variable_get( :@shift_size ).should == 125000
|
86
|
+
end
|
87
|
+
|
88
|
+
it "can be told to log to an Array" do
|
89
|
+
logmessages = []
|
90
|
+
@logger.output_to( logmessages )
|
91
|
+
@logger.logdev.should be_a( Loggability::Logger::AppendingLogDevice )
|
92
|
+
@logger.level = :debug
|
93
|
+
@logger.info( "Something happened." )
|
94
|
+
logmessages.should have( 1 ).member
|
95
|
+
logmessages.first.should =~ /something happened/i
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
|
101
|
+
describe "formatter API" do
|
102
|
+
|
103
|
+
it "logs with the default formatter by default" do
|
104
|
+
@logger.formatter.should be_a( Loggability::Formatter::Default )
|
105
|
+
end
|
106
|
+
|
107
|
+
it "can be told to use the default formatter explicitly" do
|
108
|
+
@logger.format_as( :default )
|
109
|
+
@logger.formatter.should be_a( Loggability::Formatter::Default )
|
110
|
+
end
|
111
|
+
|
112
|
+
it "can be told to use a block as a formatter" do
|
113
|
+
@logger.format_with do |severity, datetime, progname, msg|
|
114
|
+
original_formatter.call(severity, datetime, progname, msg.dump)
|
115
|
+
end
|
116
|
+
|
117
|
+
@logger.formatter.should be_a( Proc )
|
118
|
+
end
|
119
|
+
|
120
|
+
it "can be told to use the HTML formatter" do
|
121
|
+
@logger.format_as( :html )
|
122
|
+
@logger.formatter.should be_a( Loggability::Formatter::HTML )
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
describe "progname proxy" do
|
129
|
+
|
130
|
+
it "can create a proxy object that will log with the argument object as the 'progname'" do
|
131
|
+
messages = []
|
132
|
+
@logger.output_to( messages )
|
133
|
+
@logger.level = :debug
|
134
|
+
|
135
|
+
obj = Object.new
|
136
|
+
proxy = @logger.proxy_for( obj )
|
137
|
+
proxy.debug( "A debug message." )
|
138
|
+
proxy.info( "An info message." )
|
139
|
+
proxy.warn( "A warn message." )
|
140
|
+
proxy.error( "An error message." )
|
141
|
+
proxy.fatal( "A fatal message." )
|
142
|
+
|
143
|
+
messages.first.should =~ /DEBUG \{Object:0x\p{XDigit}+\} -- A debug message.\n/
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# -*- rspec -*-
|
2
|
+
|
3
|
+
BEGIN {
|
4
|
+
require 'pathname'
|
5
|
+
basedir = Pathname( __FILE__ ).dirname.parent
|
6
|
+
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
|
7
|
+
}
|
8
|
+
|
9
|
+
require 'rspec'
|
10
|
+
require 'spec/lib/helpers'
|
11
|
+
require 'loggability'
|
12
|
+
require 'loggability/logger'
|
13
|
+
|
14
|
+
describe Loggability do
|
15
|
+
|
16
|
+
it "is itself a log host for the global logger" do
|
17
|
+
described_class.logger.should be_a( Loggability::Logger )
|
18
|
+
described_class.log_hosts.should include( Loggability::GLOBAL_KEY => Loggability )
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
describe "version methods" do
|
23
|
+
it "returns a version string if asked" do
|
24
|
+
described_class.version_string.should =~ /\w+ [\d.]+/
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns a version string with a build number if asked" do
|
28
|
+
described_class.version_string(true).should =~ /\w+ [\d.]+ \(build [[:xdigit:]]+\)/
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
context "installed in a class" do
|
34
|
+
|
35
|
+
before( :each ) do
|
36
|
+
@class = Class.new { extend Loggability }
|
37
|
+
end
|
38
|
+
|
39
|
+
after( :each ) do
|
40
|
+
Loggability.clear_loghosts
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
it "allows it to be designated as a log host" do
|
45
|
+
@class.log_as( :testing )
|
46
|
+
Loggability.log_hosts.should include( :testing => @class )
|
47
|
+
@class.logger.should be_a( Loggability::Logger )
|
48
|
+
@class.default_logger.should be( @class.logger )
|
49
|
+
end
|
50
|
+
|
51
|
+
it "allows it to designate itself as a logging client" do
|
52
|
+
origin = Class.new do
|
53
|
+
extend Loggability
|
54
|
+
log_as :testing
|
55
|
+
end
|
56
|
+
@class.log_to( :testing )
|
57
|
+
@class.log.logger.should be( origin.logger )
|
58
|
+
|
59
|
+
@class.new.log.logger.should be( origin.logger )
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
context "aggregate methods" do
|
66
|
+
|
67
|
+
it "propagate some setting methods to every Logger" do
|
68
|
+
origin = Class.new do
|
69
|
+
extend Loggability
|
70
|
+
log_as :testing
|
71
|
+
end
|
72
|
+
Loggability.level = :warn
|
73
|
+
Loggability.output_to( $stdout )
|
74
|
+
Loggability.format_with( :color )
|
75
|
+
|
76
|
+
Loggability[ origin ].level.should == :warn
|
77
|
+
Loggability[ origin ].logdev.dev.should be( $stdout )
|
78
|
+
Loggability[ origin ].formatter.class.should == Loggability::Formatter::Color
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
metadata
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: loggability
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michael Granger
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain:
|
12
|
+
- !binary |-
|
13
|
+
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURMRENDQWhTZ0F3SUJB
|
14
|
+
Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREE4TVF3d0NnWURWUVFEREFOblpX
|
15
|
+
UXgKRnpBVkJnb0praWFKay9Jc1pBRVpGZ2RmWVdWeWFXVmZNUk13RVFZS0Na
|
16
|
+
SW1pWlB5TEdRQkdSWURiM0puTUI0WApEVEV3TURreE5qRTBORGcxTVZvWERU
|
17
|
+
RXhNRGt4TmpFME5EZzFNVm93UERFTU1Bb0dBMVVFQXd3RFoyVmtNUmN3CkZR
|
18
|
+
WUtDWkltaVpQeUxHUUJHUllIWDJGbGNtbGxYekVUTUJFR0NnbVNKb21UOGl4
|
19
|
+
a0FSa1dBMjl5WnpDQ0FTSXcKRFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURD
|
20
|
+
Q0FRb0NnZ0VCQUx5Ly9CRnhDMWYvY1BTbnd0SkJXb0ZpRnJpcgpoN1JpY0kr
|
21
|
+
am9xL29jVlhRcUk0VERXUHlGLzh0cWt2dCtyRDk5WDlxczJZZVI4Q1UvWWlJ
|
22
|
+
cExXclFPWVNUNzBKCnZEbjdVdmhiMm11RlZxcTYrdm9iZVRrSUxCRU82cGlv
|
23
|
+
bldERzhqU2JvM3FLbTFSaktKRHdnOXA0d05LaFB1dTgKS0d1ZS9CRmI2N0tm
|
24
|
+
bHF5QXBQbVBlYjNWZGQ5Y2xzcHpxZUZxcDdjVUJNRXBGUzZMV3h5NEdrK3F2
|
25
|
+
RkZKQkpMQgpCVUhFL0xaVkpNVnpmcEM1VXErUW1ZN0IrRkgvUXFObmRuM3RP
|
26
|
+
SGdzUGFkTFROaW11QjFzQ3VMMWE0ejNQZXBkClRlTEJFRm1FYW81RGszSy9R
|
27
|
+
OG84dmxiSUIvakJEVFV4NkRqYmd4dzc3OTA5eDZnSTlkb1U0TEQ1WE1jQ0F3
|
28
|
+
RUEKQWFNNU1EY3dDUVlEVlIwVEJBSXdBREFMQmdOVkhROEVCQU1DQkxBd0hR
|
29
|
+
WURWUjBPQkJZRUZKZW9Ha09yOWw0Qgorc2FNa1cvWlhUNFVlU3ZWTUEwR0NT
|
30
|
+
cUdTSWIzRFFFQkJRVUFBNElCQVFCRzJLT2J2WUkyZUh5eUJVSlNKM2pOCnZF
|
31
|
+
blUzZDYwem5BWGJyU2QycWIzcjFsWTFFUEREM2JjeTBNZ2dDZkdkZzNYdTU0
|
32
|
+
ejIxb3F5SWRrOHVHdFdCUEwKSElhOUVnZkZHU1VFZ3ZjSXZhWXFpTjRqVFV0
|
33
|
+
aWRmRUZ3K0x0anM4QVA5Z1dnU0lZUzZHcjM4VjBXR0ZGTnpJSAphT0Qyd211
|
34
|
+
OW9vL1JmZlc0aFMvOEd1dmZNemN3N0NRMzU1d0ZSNEtCL255emUrRXNaMVk1
|
35
|
+
RGVyQ0FhZ01WdURRClUwQkxtV0RGelBHR1dsUGVRQ3JZSENyK0FjSnorTlJu
|
36
|
+
YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
|
37
|
+
Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
|
38
|
+
cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
39
|
+
date: 2012-05-06 00:00:00.000000000 Z
|
40
|
+
dependencies:
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pluginfactory
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '1.0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: hoe-mercurial
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ~>
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.4.0
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ~>
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 1.4.0
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: hoe-highline
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ~>
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 0.1.0
|
81
|
+
type: :development
|
82
|
+
prerelease: false
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
85
|
+
requirements:
|
86
|
+
- - ~>
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.1.0
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rdoc
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.10'
|
97
|
+
type: :development
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ~>
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '3.10'
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: hoe-deveiate
|
107
|
+
requirement: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ~>
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0.1'
|
113
|
+
type: :development
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ~>
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0.1'
|
121
|
+
- !ruby/object:Gem::Dependency
|
122
|
+
name: simplecov
|
123
|
+
requirement: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ~>
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0.6'
|
129
|
+
type: :development
|
130
|
+
prerelease: false
|
131
|
+
version_requirements: !ruby/object:Gem::Requirement
|
132
|
+
none: false
|
133
|
+
requirements:
|
134
|
+
- - ~>
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0.6'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: hoe
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ~>
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '3.0'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '3.0'
|
153
|
+
description: ! "A composable logging system built on the standard Logger library.\n\nYou
|
154
|
+
can add Loggability to large libraries and systems, then hook everything\nup later
|
155
|
+
when you know where you want logs to be written, at what level of\nseverity, and
|
156
|
+
in which format.\n\nAn example:\n\n # Load a bunch of libraries\n\trequire 'strelka'\n\trequire
|
157
|
+
'inversion'\n\trequire 'treequel'\n\trequire 'loggability'\n\n # Now tell everything
|
158
|
+
that's using Loggability to log to an HTML\n\t# log file at INFO level\n\tLoggability.write_to(
|
159
|
+
'/usr/local/www/htdocs/log.html' )\n\tLoggability.format_as( :html )\n\tLoggability.level
|
160
|
+
= :info"
|
161
|
+
email:
|
162
|
+
- ged@FaerieMUD.org
|
163
|
+
executables:
|
164
|
+
- loggability
|
165
|
+
extensions: []
|
166
|
+
extra_rdoc_files:
|
167
|
+
- History.rdoc
|
168
|
+
- Manifest.txt
|
169
|
+
- README.rdoc
|
170
|
+
files:
|
171
|
+
- ChangeLog
|
172
|
+
- History.rdoc
|
173
|
+
- Manifest.txt
|
174
|
+
- README.rdoc
|
175
|
+
- Rakefile
|
176
|
+
- bin/loggability
|
177
|
+
- lib/loggability.rb
|
178
|
+
- lib/loggability/constants.rb
|
179
|
+
- lib/loggability/formatter.rb
|
180
|
+
- lib/loggability/formatter/color.rb
|
181
|
+
- lib/loggability/formatter/default.rb
|
182
|
+
- lib/loggability/formatter/html.rb
|
183
|
+
- lib/loggability/logger.rb
|
184
|
+
- spec/lib/helpers.rb
|
185
|
+
- spec/loggability/formatter/color_spec.rb
|
186
|
+
- spec/loggability/formatter/html_spec.rb
|
187
|
+
- spec/loggability/formatter_spec.rb
|
188
|
+
- spec/loggability/logger_spec.rb
|
189
|
+
- spec/loggability_spec.rb
|
190
|
+
- .gemtest
|
191
|
+
homepage: http://deveiate.org/projects/loggability
|
192
|
+
licenses:
|
193
|
+
- Ruby
|
194
|
+
post_install_message:
|
195
|
+
rdoc_options:
|
196
|
+
- -f
|
197
|
+
- fivefish
|
198
|
+
- -t
|
199
|
+
- Loggability Toolkit
|
200
|
+
require_paths:
|
201
|
+
- lib
|
202
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
204
|
+
requirements:
|
205
|
+
- - ! '>='
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: 1.9.3
|
208
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
210
|
+
requirements:
|
211
|
+
- - ! '>='
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
requirements: []
|
215
|
+
rubyforge_project: loggability
|
216
|
+
rubygems_version: 1.8.24
|
217
|
+
signing_key:
|
218
|
+
specification_version: 3
|
219
|
+
summary: A composable logging system built on the standard Logger library
|
220
|
+
test_files: []
|