diff options
Diffstat (limited to 'railties/lib/rails_generator/generators/applications/app')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/template_runner.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails_generator/generators/applications/app/template_runner.rb b/railties/lib/rails_generator/generators/applications/app/template_runner.rb index 4af85762aa..7f2e086271 100644 --- a/railties/lib/rails_generator/generators/applications/app/template_runner.rb +++ b/railties/lib/rails_generator/generators/applications/app/template_runner.rb @@ -355,5 +355,15 @@ module Rails def logger @logger ||= Rails::Generator::Base.logger end + + def logger + @logger ||= if defined?(Rails::Generator::Base) + Rails::Generator::Base.logger + else + require 'rails_generator/simple_logger' + Rails::Generator::SimpleLogger.new(STDOUT) + end + end + end end
\ No newline at end of file |