lumberjack 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/lumberjack/logger.rb +5 -3
- data/spec/logger_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42cbdb5c237b381f32d8783fd22c8f69d813948c
|
4
|
+
data.tar.gz: 648ceb72a4aa0524437a84e446a85e2363ed7edc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7995c01ecb76e56d62dbd3e021c948d53f93713792344ef6d8018f8f277e58977cc612cf7280d6fbfa31a8f4c2f29517d3d159568c6168c8092a3249a6259428
|
7
|
+
data.tar.gz: fcddab2aaed76d3d960faad30cb4a0269a0b2189dc83d28567fc9a8fd269c841a57a766ad7f00bd94e4d484a198876cb1ee08d6ea50a20e102ec79df1ce421b1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.7
|
data/lib/lumberjack/logger.rb
CHANGED
@@ -25,9 +25,6 @@ module Lumberjack
|
|
25
25
|
class Logger
|
26
26
|
include Severity
|
27
27
|
|
28
|
-
# The Formatter object used to convert messages into strings.
|
29
|
-
attr_reader :formatter
|
30
|
-
|
31
28
|
# The time that the device was last flushed.
|
32
29
|
attr_reader :last_flushed_at
|
33
30
|
|
@@ -75,6 +72,11 @@ module Lumberjack
|
|
75
72
|
create_flusher_thread(max_flush_seconds) if max_flush_seconds > 0
|
76
73
|
end
|
77
74
|
|
75
|
+
# Get the Formatter object used to convert messages into strings.
|
76
|
+
def formatter
|
77
|
+
@_formatter
|
78
|
+
end
|
79
|
+
|
78
80
|
# Get the level of severity of entries that are logged. Entries with a lower
|
79
81
|
# severity level will be ignored.
|
80
82
|
def level
|
data/spec/logger_spec.rb
CHANGED
@@ -19,6 +19,12 @@ describe Lumberjack::Logger do
|
|
19
19
|
logger.device.class.should == Lumberjack::Device::Writer
|
20
20
|
end
|
21
21
|
|
22
|
+
it "should have a formatter" do
|
23
|
+
output = StringIO.new
|
24
|
+
logger = Lumberjack::Logger.new(output)
|
25
|
+
logger.formatter.should be
|
26
|
+
end
|
27
|
+
|
22
28
|
it "should open a file path in a device" do
|
23
29
|
logger = Lumberjack::Logger.new(File.join(tmp_dir, "log_file_1.log"))
|
24
30
|
logger.device.class.should == Lumberjack::Device::LogFile
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lumberjack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Durand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple, powerful, and very fast logging utility that can be a drop
|
14
14
|
in replacement for Logger or ActiveSupport::BufferedLogger. Provides support for
|