FIX: No loggers may have been chained.

This commit is contained in:
Guo Xiang Tan 2016-11-14 11:39:19 +08:00
parent e8a3043129
commit 759feef3f0
1 changed files with 2 additions and 1 deletions

View File

@ -87,5 +87,6 @@ RailsMultisite::ConnectionManagement.each_connection do
end
if Rails.configuration.multisite
Rails.logger.instance_variable_get(:@chained).first.formatter = RailsMultisite::Formatter.new
chained = Rails.logger.instance_variable_get(:@chained)
chained && chained.first.formatter = RailsMultisite::Formatter.new
end