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:
parent
87d80ba976
commit
b94b04b1d1
1 changed files with 3 additions and 3 deletions
|
@ -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 }
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue