`Logster::Logger#chained` is now readable in new version of logster.

This commit is contained in:
Guo Xiang Tan 2018-08-14 09:57:09 +08:00
parent b504398a91
commit 402e570c77
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -106,7 +106,7 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
# Remove ActiveSupport::Logger from the chain and replace with Lograge's # Remove ActiveSupport::Logger from the chain and replace with Lograge's
# logger # logger
Rails.logger.instance_variable_get(:@chained).pop Rails.logger.chained.pop
Rails.logger.chain(config.lograge.logger) Rails.logger.chain(config.lograge.logger)
end end
end end