semantic_logger 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/semantic_logger/railtie.rb +3 -10
- data/lib/semantic_logger/version.rb +1 -1
- metadata +3 -3
@@ -69,17 +69,10 @@ module SemanticLogger #:nodoc:
|
|
69
69
|
logger
|
70
70
|
end
|
71
71
|
|
72
|
-
# #TODO Should these be moved?
|
73
72
|
# Replace the default Rails loggers
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
if defined?(ActionController::Base)
|
78
|
-
ActionController::Base.logger = SemanticLogger::Logger.new(ActionController)
|
79
|
-
end
|
80
|
-
if defined?(ActiveResource::Base)
|
81
|
-
ActiveResource::Base.logger = SemanticLogger::Logger.new(ActiveResource)
|
82
|
-
end
|
73
|
+
ActiveSupport.on_load(:active_record) { self.logger = SemanticLogger::Logger.new('ActiveRecord') }
|
74
|
+
ActiveSupport.on_load(:action_controller) { self.logger = SemanticLogger::Logger.new('ActionController') }
|
75
|
+
ActiveSupport.on_load(:action_mailer) { self.logger = SemanticLogger::Logger.new('ActionMailer') }
|
83
76
|
|
84
77
|
SemanticLogger::Logger.logger.info "SemanticLogger initialized"
|
85
78
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 1
|
9
|
+
version: 0.5.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Reid Morrison
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-09-
|
17
|
+
date: 2012-09-13 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|