diff options
author | Xavier Noria <fxn@hashref.com> | 2019-02-21 01:26:36 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2019-02-21 01:57:21 -0800 |
commit | 39aaa0264aa1772cd1b3769a3c649d1d9bb11918 (patch) | |
tree | 8bb95ee78776d4117dc92201b2a92ee56656365b /railties/lib/rails | |
parent | b57ca840a6fe64b7a76bc6585dff26e5c08879fb (diff) | |
download | rails-39aaa0264aa1772cd1b3769a3c649d1d9bb11918.tar.gz rails-39aaa0264aa1772cd1b3769a3c649d1d9bb11918.tar.bz2 rails-39aaa0264aa1772cd1b3769a3c649d1d9bb11918.zip |
Define Rails.autoloaders.logger=
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/autoloaders.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/autoloaders.rb b/railties/lib/rails/autoloaders.rb index b03499cf81..4b41e1faf9 100644 --- a/railties/lib/rails/autoloaders.rb +++ b/railties/lib/rails/autoloaders.rb @@ -24,6 +24,11 @@ module Rails end end + def logger=(logger) + callable_or_nil = logger.respond_to?(:debug) ? logger.method(:debug) : logger + each { |loader| loader.logger = callable_or_nil } + end + def zeitwerk_enabled? Rails.configuration.autoloader == :zeitwerk end |