formatted_rails_logger 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,30 +1,21 @@
|
|
1
1
|
# intentionally raise if not already defined. For some reason I feel like
|
2
|
-
# doing this rather than declaring Rails a dependency.
|
3
|
-
ActiveSupport::BufferedLogger.class
|
2
|
+
# doing this rather than declaring Rails a dependency.
|
3
|
+
ActiveSupport::BufferedLogger.class
|
4
4
|
|
5
5
|
# Rails 3.2 BufferedLogger has an internal @logger with a stdlib rails
|
6
6
|
# logger, but it doesn't expose ability to set a formatter. We've just
|
7
|
-
# got to do that, no problem.
|
7
|
+
# got to do that, no problem.
|
8
8
|
class ActiveSupport::BufferedLogger
|
9
9
|
attr_accessor :formatter
|
10
|
-
|
11
|
-
# better semantics for inheritance, but they keep changing
|
12
|
-
# version to version, so nope.
|
13
|
-
class << self ; attr_accessor :default_formatter ; end
|
14
|
-
|
15
|
-
def initialize(*args)
|
16
|
-
super(*args)
|
17
|
-
@log.formatter = self.class.default_formatter if self.class.default_formatter
|
18
|
-
end
|
19
|
-
|
10
|
+
|
20
11
|
def formatter=(formatter)
|
21
12
|
@log.formatter = formatter
|
22
13
|
end
|
23
|
-
|
14
|
+
|
24
15
|
def formatter
|
25
16
|
@log.formatter
|
26
17
|
end
|
27
|
-
|
28
|
-
|
18
|
+
|
19
|
+
|
29
20
|
end
|
30
21
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formatted_rails_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &228251260 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 3.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *228251260
|
25
25
|
description:
|
26
26
|
email:
|
27
27
|
- jonathan@dnil.net
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project: formatted_rails_logger
|
61
|
-
rubygems_version: 1.8.
|
61
|
+
rubygems_version: 1.8.15
|
62
62
|
signing_key:
|
63
63
|
specification_version: 3
|
64
64
|
summary: Formatting capabilities for Rails BufferedLogger
|