aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/process
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-07-08 22:47:41 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-07-08 22:49:34 +0200
commit0e7175d1e9260834a24bb23d670e4bda44a05795 (patch)
tree838e8995f5f784f2668560ec1ebfbd54399f9e85 /lib/action_cable/process
parente584f49e867de8355fd455e3429d73c3e245dbc7 (diff)
downloadrails-0e7175d1e9260834a24bb23d670e4bda44a05795.tar.gz
rails-0e7175d1e9260834a24bb23d670e4bda44a05795.tar.bz2
rails-0e7175d1e9260834a24bb23d670e4bda44a05795.zip
Add a process logging file that the config.ru file can require to configure EM and Celluloid logging
Diffstat (limited to 'lib/action_cable/process')
-rw-r--r--lib/action_cable/process/logging.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/action_cable/process/logging.rb b/lib/action_cable/process/logging.rb
new file mode 100644
index 0000000000..bcceff4bec
--- /dev/null
+++ b/lib/action_cable/process/logging.rb
@@ -0,0 +1,6 @@
+EM.error_handler do |e|
+ puts "Error raised inside the event loop: #{e.message}"
+ puts e.backtrace.join("\n")
+end
+
+Celluloid.logger = ActionCable.server.logger