Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log reflex payloads client-side #476

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

julianrubisch
Copy link
Contributor

Enhancement

Description

Added the newly added payload to the client side logger

Why should this be added

DX? πŸ€·β€β™‚οΈ

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

Please note that the best way to suggest changes or updates to the documentation is to join Discord and leave a note in the #docs channel. Any documentation updates posted as PRs cannot be accepted at this time. ❀️

@leastbad
Copy link
Contributor

On face value, this is amazing as delivered. What if someone uses the payload to deliver a large string, however? I'd recommend converting the payload to a String and constraining the payload to something really modest like 6-8 characters, and then appending a "..." if it exceeds that.

@julianrubisch
Copy link
Contributor Author

Hmm not sure this would be as helpful... if I'm returning a JavaScript object, I want to inspect that, and not a string

What am I missing? What's the harm with rendering a large string in the debug output?

@leastbad
Copy link
Contributor

Actually, given that this will be inside of the object following the log message, my concern is abated.

My fear was that the payload would become part of the main debug message, but that's not what's being proposed here. I have no problem with the value being available for inspection inside of an object you have to click to expand, anyhow.

@leastbad leastbad merged commit e2bb07c into stimulusreflex:master Mar 23, 2021
@leastbad leastbad deleted the log-payloads branch March 23, 2021 23:33
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.

2 participants