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

Fix and make example generic in README as well [ci skip]

This commit is contained in:
Vipul A M 2016-06-15 22:04:56 -07:00
parent 87d80ba976
commit b94b04b1d1
No known key found for this signature in database
GPG key ID: 4C9362FE1F574587

View file

@ -378,11 +378,11 @@ App.cable = ActionCable.createConsumer()
### Other Configurations
The other common option to configure is the log tags applied to the per-connection logger. Here's close to what we're using in Basecamp:
The other common option to configure is the log tags applied to the per-connection logger. Here's an example that uses the user account id if available, else "no-account" while tagging:
```ruby
Rails.application.config.action_cable.log_tags = [
-> request { request.env['bc.account_id'] || "no-account" },
config.action_cable.log_tags = [
-> request { request.env['user_account_id'] || "no-account" },
:action_cable,
-> request { request.uuid }
]