lumberjack 1.0.5 → 1.0.6
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 +2 -2
- 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: 6222aa162f7bdb27058013ce4d90384e9811c5e8
|
4
|
+
data.tar.gz: f2831eab5448372834820bbac2c810cb20552e2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10f93f7d0cbe924ea9cb12287a8c6cd1f88280a92be0931adc560adf9631db109279a2ff08914432ab5bc9d11b665499b4fc7ec432783555e73c661303a8df43
|
7
|
+
data.tar.gz: 288245e53368ce595d9b41b6f46dfd5a721e9aa9b76a3b1a93b04c744ae25c920927380e96449a992eacce6247fe3f2e42166c44bbf575bc3de5deba35a41af7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
data/lib/lumberjack/logger.rb
CHANGED
@@ -67,7 +67,7 @@ module Lumberjack
|
|
67
67
|
max_flush_seconds = options.delete(:flush_seconds).to_f
|
68
68
|
|
69
69
|
@device = open_device(device, options)
|
70
|
-
@
|
70
|
+
@_formatter = Formatter.new
|
71
71
|
@lock = Mutex.new
|
72
72
|
@last_flushed_at = Time.now
|
73
73
|
@silencer = true
|
@@ -110,7 +110,7 @@ module Lumberjack
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
-
message = @
|
113
|
+
message = @_formatter.format(message)
|
114
114
|
progname ||= self.progname
|
115
115
|
entry = LogEntry.new(time, severity, message, progname, $$, Lumberjack.unit_of_work_id)
|
116
116
|
begin
|
data/spec/logger_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
describe Lumberjack::Logger do
|
4
5
|
|
@@ -23,6 +24,11 @@ describe Lumberjack::Logger do
|
|
23
24
|
logger.device.class.should == Lumberjack::Device::LogFile
|
24
25
|
end
|
25
26
|
|
27
|
+
it "should open a pathname in a device" do
|
28
|
+
logger = Lumberjack::Logger.new(Pathname.new(File.join(tmp_dir, "log_file_1.log")))
|
29
|
+
logger.device.class.should == Lumberjack::Device::LogFile
|
30
|
+
end
|
31
|
+
|
26
32
|
it "should use the null device if the stream is :null" do
|
27
33
|
logger = Lumberjack::Logger.new(:null)
|
28
34
|
logger.device.class.should == Lumberjack::Device::Null
|
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.6
|
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-05-29 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
|