You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if StimulusReflex offered better logging tooling that was comfortably in-between "way too verbose" and "totally suppressed".
Is your feature request related to a problem?
@marcoroth recently added amazing client-side logging, but we offer no SR-specific feedback unless there's literally an excpetion. This leads to lots of puts statements in Reflexes while debugging. We can do better!
Describe the solution you'd like
The ideal solution emits one tastefully colored line per Reflex action.
@leastbad Recently I worked on a server-side logging per reflex action. As a result debugging in development feels more friendly 👍 The guidelines defined in this issue were helpful. Thanks for that. There is a linked PR where you can find an overview of my solution. Give it a go, please! 🏎️ + 👀
Feature Request
It would be nice if StimulusReflex offered better logging tooling that was comfortably in-between "way too verbose" and "totally suppressed".
Is your feature request related to a problem?
@marcoroth recently added amazing client-side logging, but we offer no SR-specific feedback unless there's literally an excpetion. This leads to lots of
puts
statements in Reflexes while debugging. We can do better!Describe the solution you'd like
The ideal solution emits one tastefully colored line per Reflex action.
Some possible columns include:
ReflexClass#action eg. Example#hello
Timestamp: eg. Time.now
Round-trip execution time eg 8ms
Session Identifier: eg. [215a1c85]
Connection Identifier from AC channel: eg. leastbad
Mode: eg. :selector
Selector: eg. #notification
Operation: eg. (selector: #notification)
Dream output
[215a1c85] Example#hello in 8ms (selector: #notification) for "leastbad" at 2020-07-07 15:04:13
... but in color.
Bonus points for being configurable via an initializer:
Additional context
The current options are two extremes: https://docs.stimulusreflex.com/troubleshooting#server-side
Adding an initializer is long overdue! Here's how:
Colors!
puts "\e[32mThis is green!"
puts "\e[1;32mThis is bright green!"
The text was updated successfully, but these errors were encountered: