From bc3cf14c8cbc2ca9fd309a8fc04f942f48048e3c Mon Sep 17 00:00:00 2001 From: Kartikey Tanna Date: Mon, 6 Jul 2020 23:32:31 +0530 Subject: [PATCH] Created a section for ActionCable client side logger --- guides/source/action_cable_overview.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md index f456948c75..cac3cf48a2 100644 --- a/guides/source/action_cable_overview.md +++ b/guides/source/action_cable_overview.md @@ -754,6 +754,17 @@ connections as you have workers. The default worker pool size is set to 4, so that means you have to make at least 4 database connections available. You can change that in `config/database.yml` through the `pool` attribute. +### Client side logging + +Client side logging is disabled by default. You can enable this by setting the `ActionCable.logger.enabled` to true. + +```ruby +import * as ActionCable from '@rails/actioncable' + +ActionCable.logger.enabled = true +``` + + ### Other Configurations The other common option to configure is the log tags applied to the @@ -771,14 +782,6 @@ config.action_cable.log_tags = [ For a full list of all configuration options, see the `ActionCable::Server::Configuration` class. -Client-side logs can be enabled with the following: - -```ruby -import * as ActionCable from '@rails/actioncable' - -ActionCable.logger.enabled = true -``` - ## Running Standalone Cable Servers ### In App