Skip to content

Comments

Updatable logging#249

Merged
julianrubisch merged 2 commits intomasterfrom
updatable-log
Feb 10, 2023
Merged

Updatable logging#249
julianrubisch merged 2 commits intomasterfrom
updatable-log

Conversation

@julianrubisch
Copy link
Contributor

Enhancement

Description

Ports over some client side logging functionality from StimulusReflex to better be able to debug and benchmark Updatable interactions.

As in StimulusReflex, logging has to be explicitly enabled by passing {debug: true} to CableReady.initialize.

Fixes #246

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

Copy link
Contributor

@hopsoft hopsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very much needed to help folks debug updatable. One question for you.

},
set (value) {
debugging = !!value
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value and set seem to be redundant to the enabled, disabled getters and the debug setter. Do we actually need those functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, I just copied this over 1:1 from SR, didn't wanna waste too much time 🙃

but I'll be happy to remove it if you like

Log.cancel(this.lastUpdateTimestamp, 'Update already requested')

return
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These guards are great!

@julianrubisch julianrubisch merged commit 9f50edb into master Feb 10, 2023
@julianrubisch julianrubisch deleted the updatable-log branch February 10, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve updatable console logs/warnings

2 participants