rails_semantic_logger 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_semantic_logger/railtie.rb +13 -2
- data/lib/rails_semantic_logger/version.rb +1 -1
- 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: 7eb8148ab17de1d3ffe25b677bc9d5d15ab222e7
|
4
|
+
data.tar.gz: a332f3ef9f011efd32a89576db64fae6fe964761
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af4d6cd79f0f381f592e415fe2fbdf7e6529ec616065fde3e61348b88e6abe3d7787261138146eb48492e70b74e4c7f80342a950e6937e4d3370012ca02bf03
|
7
|
+
data.tar.gz: 122df31e2956566be5e66365bd7a42d23d38b758d890228b830b52cdf30549ecac8eab75e225a49f54085101dd760205e18c437e6da8ba368d0f4bb7585da209
|
@@ -22,7 +22,12 @@ module RailsSemanticLogger #:nodoc:
|
|
22
22
|
#
|
23
23
|
# Loaded after Rails logging is initialized since SemanticLogger will continue
|
24
24
|
# to forward logging to the Rails Logger
|
25
|
-
|
25
|
+
|
26
|
+
# Stop standard rails logger initializer from running, since the following line causes problems:
|
27
|
+
# Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
|
28
|
+
Rails::Application::Bootstrap.initializers.delete_if{|i| i.name == :initialize_logger}
|
29
|
+
|
30
|
+
initializer :initialize_logger, group: :all do
|
26
31
|
config = Rails.application.config
|
27
32
|
|
28
33
|
# Set the default log level based on the Rails config
|
@@ -68,6 +73,9 @@ module RailsSemanticLogger #:nodoc:
|
|
68
73
|
ActiveSupport.on_load(:active_record) { self.logger = SemanticLogger['ActiveRecord'] }
|
69
74
|
ActiveSupport.on_load(:action_controller) { self.logger = SemanticLogger['ActionController'] }
|
70
75
|
ActiveSupport.on_load(:action_mailer) { self.logger = SemanticLogger['ActionMailer'] }
|
76
|
+
|
77
|
+
# Rails 4 is overwriting existing values for the logger, unless set via config
|
78
|
+
config.action_controller.logger = SemanticLogger['ActionController']
|
71
79
|
end
|
72
80
|
|
73
81
|
# Support fork frameworks
|
@@ -93,7 +101,10 @@ module RailsSemanticLogger #:nodoc:
|
|
93
101
|
Moped.logger = SemanticLogger[Moped] if defined?(Moped)
|
94
102
|
|
95
103
|
# Replace the Resque Logger
|
96
|
-
Resque.logger = SemanticLogger[Resque] if defined?(Resque)
|
104
|
+
Resque.logger = SemanticLogger[Resque] if defined?(Resque) && Resque.respond_to?(:logger)
|
105
|
+
|
106
|
+
# Replace the Sidekiq logger
|
107
|
+
Sidekiq::Logging.logger = SemanticLogger[Sidekiq] if defined?(Sidekiq)
|
97
108
|
end
|
98
109
|
|
99
110
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_semantic_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic_logger
|