module MrLogaLoga::Extensions::RailsExtension::ServerPatch
This patches the server command so that console output will use the same logger you previously configured
Public Instance Methods
log_to_stdout()
click to toggle source
# File lib/mr_loga_loga/extensions/rails.rb, line 137 def log_to_stdout wrapped_app # touch the app so the logger is set up console = Rails.logger.class.new(STDOUT) console.formatter = Rails.logger.formatter console.level = Rails.logger.level unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDOUT) Rails.logger.extend(ActiveSupport::Logger.broadcast(console)) end end