1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

log to stdout in development mode.

This commit is contained in:
Lachlan Sylvester 2015-08-07 18:58:22 +10:00
parent edbef56c1f
commit 84e7d76e37
2 changed files with 10 additions and 0 deletions

View file

@ -4,3 +4,5 @@ EM.error_handler do |e|
end
Celluloid.logger = ActionCable.server.logger
ActionCable.server.config.log_to_stdout if Rails.env.development?

View file

@ -18,6 +18,14 @@ module ActionCable
@channels_path = Rails.root.join('app/channels')
end
def log_to_stdout
console = ActiveSupport::Logger.new($stdout)
console.formatter = @logger.formatter
console.level = @logger.level
@logger.extend(ActiveSupport::Logger.broadcast(console))
end
def channel_paths
@channels ||= Dir["#{channels_path}/**/*_channel.rb"]
end