rails_semantic_logger 4.3.1 → 4.3.2
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/engine.rb +16 -7
- data/lib/rails_semantic_logger/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6b01dd1f64e486ec066a9748b06400742da99c5089b3d142c79f69b74d8681d
|
4
|
+
data.tar.gz: 1ee4c3bd26b1bf8291cc35bbd7e5d7e414d5bef27e82dd57b371e7a89a9bf896
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1caebdddbc1576014e3fc3a72335736619d9461768f580f8b8ad0a90e963811041bea3b9b1d3bf5827b7f256f11773a9ed0fd133c513dfd3d6917936b0929980
|
7
|
+
data.tar.gz: '09fc4bf3cf5ee8c3581a27871e03c34b13d922e99dc60a5a07c4639c4e0086ed1d560f568bb9a3408908a8361f8d6df1b5f0f7546d304bec526d406be5539c42'
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'active_record/log_subscriber'
|
2
1
|
require 'action_controller/log_subscriber'
|
3
2
|
|
4
3
|
module RailsSemanticLogger
|
@@ -222,11 +221,15 @@ module RailsSemanticLogger
|
|
222
221
|
|
223
222
|
if config.rails_semantic_logger.semantic
|
224
223
|
# Active Record
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
224
|
+
if defined?(::ActiveRecord)
|
225
|
+
require 'active_record/log_subscriber'
|
226
|
+
|
227
|
+
RailsSemanticLogger.swap_subscriber(
|
228
|
+
::ActiveRecord::LogSubscriber,
|
229
|
+
RailsSemanticLogger::ActiveRecord::LogSubscriber,
|
230
|
+
:active_record
|
231
|
+
)
|
232
|
+
end
|
230
233
|
|
231
234
|
# Rack
|
232
235
|
RailsSemanticLogger::Rack::Logger.started_request_log_level = :info if config.rails_semantic_logger.started
|
@@ -260,7 +263,13 @@ module RailsSemanticLogger
|
|
260
263
|
# Passenger provides the :starting_worker_process event for executing
|
261
264
|
# code after it has forked, so we use that and reconnect immediately.
|
262
265
|
if defined?(PhusionPassenger)
|
263
|
-
PhusionPassenger.on_event(:starting_worker_process)
|
266
|
+
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
267
|
+
if forked
|
268
|
+
# Workaround CRuby crash on fork https://github.com/rocketjob/semantic_logger/issues/103
|
269
|
+
SemanticLogger::Processor.instance.instance_variable_set(:@queue, Queue.new)
|
270
|
+
SemanticLogger.reopen
|
271
|
+
end
|
272
|
+
end
|
264
273
|
end
|
265
274
|
|
266
275
|
# Re-open appenders after Resque has forked a worker
|
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: 4.3.
|
4
|
+
version: 4.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.7.
|
86
|
+
rubygems_version: 2.7.7
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: Feature rich logging framework that replaces the Rails logger.
|