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:
parent
edbef56c1f
commit
84e7d76e37
2 changed files with 10 additions and 0 deletions
|
@ -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?
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue