mirror of https://github.com/rails/rails
Merge pull request #39123 from tannakartikey/actioncable_logger_docs
Added docs for client-side logger
This commit is contained in:
commit
1eade80dd6
|
@ -1,5 +1,17 @@
|
||||||
import adapters from "./adapters"
|
import adapters from "./adapters"
|
||||||
|
|
||||||
|
// The logger is disabled by default. You can enable it with:
|
||||||
|
//
|
||||||
|
// ActionCable.logger.enabled = true
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
//
|
||||||
|
// import * as ActionCable from '@rails/actioncable'
|
||||||
|
//
|
||||||
|
// ActionCable.logger.enabled = true
|
||||||
|
// ActionCable.logger.log('Connection Established.')
|
||||||
|
//
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
log(...messages) {
|
log(...messages) {
|
||||||
if (this.enabled) {
|
if (this.enabled) {
|
||||||
|
|
|
@ -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.
|
that means you have to make at least 4 database connections available.
|
||||||
You can change that in `config/database.yml` through the `pool` attribute.
|
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
|
### Other Configurations
|
||||||
|
|
||||||
The other common option to configure is the log tags applied to the
|
The other common option to configure is the log tags applied to the
|
||||||
|
|
Loading…
Reference in New Issue