aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable')
-rw-r--r--actioncable/lib/action_cable/connection/tagged_logger_proxy.rb4
-rw-r--r--actioncable/lib/action_cable/process/logging.rb2
-rw-r--r--actioncable/lib/action_cable/server/configuration.rb8
-rw-r--r--actioncable/lib/rails/generators/channel/templates/assets/channel.coffee3
4 files changed, 5 insertions, 12 deletions
diff --git a/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb b/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb
index e5319087fb..41afa9680a 100644
--- a/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb
+++ b/actioncable/lib/action_cable/connection/tagged_logger_proxy.rb
@@ -1,7 +1,7 @@
module ActionCable
module Connection
- # Allows the use of per-connection tags against the server logger. This wouldn't work using the tradional
- # ActiveSupport::TaggedLogging-enhanced Rails.logger, as that logger will reset the tags between requests.
+ # Allows the use of per-connection tags against the server logger. This wouldn't work using the traditional
+ # <tt>ActiveSupport::TaggedLogging</tt> enhanced Rails.logger, as that logger will reset the tags between requests.
# The connection is long-lived, so it needs its own set of tags for its independent duration.
class TaggedLoggerProxy
attr_reader :tags
diff --git a/actioncable/lib/action_cable/process/logging.rb b/actioncable/lib/action_cable/process/logging.rb
index 618ba7357a..72b1a080d1 100644
--- a/actioncable/lib/action_cable/process/logging.rb
+++ b/actioncable/lib/action_cable/process/logging.rb
@@ -8,5 +8,3 @@ EM.error_handler do |e|
end
Celluloid.logger = ActionCable.server.logger
-
-ActionCable.server.config.log_to_stdout if Rails.env.development? \ No newline at end of file
diff --git a/actioncable/lib/action_cable/server/configuration.rb b/actioncable/lib/action_cable/server/configuration.rb
index 5d65f5e0e9..935133cbba 100644
--- a/actioncable/lib/action_cable/server/configuration.rb
+++ b/actioncable/lib/action_cable/server/configuration.rb
@@ -20,14 +20,6 @@ module ActionCable
@disable_request_forgery_protection = false
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
diff --git a/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee b/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee
index 69f945ca3f..149821f1ea 100644
--- a/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee
+++ b/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee
@@ -5,6 +5,9 @@ App.<%= class_name.underscore %> = App.cable.subscriptions.create "<%= class_nam
disconnected: ->
# Called when the subscription has been terminated by the server
+ received: (data) ->
+ # Called when there's incoming data on the websocket for this channel
+
<% actions.each do |action| -%>
<%= action %>: ->
@perform '<%= action %>'