diff options
Diffstat (limited to 'actioncable/app/javascript/action_cable/logger.js')
-rw-r--r-- | actioncable/app/javascript/action_cable/logger.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actioncable/app/javascript/action_cable/logger.js b/actioncable/app/javascript/action_cable/logger.js new file mode 100644 index 0000000000..ef4661ead1 --- /dev/null +++ b/actioncable/app/javascript/action_cable/logger.js @@ -0,0 +1,10 @@ +import adapters from "./adapters" + +export default { + log(...messages) { + if (this.enabled) { + messages.push(Date.now()) + adapters.logger.log("[ActionCable]", ...messages) + } + }, +} |