qwik-speak
qwik-speak copied to clipboard
Debug messages in config
Hi,
Currently there's no way to turn off debug messages on local machine. It's very convenient to have them during debugging, but when everything is set up, there's no point to have them in console both on server and client.
This is non-breaking change that adds ability to turn them off.
If it's not a good fit for your vision, could you add ability to turn them off the way you see it?
@mhuretski Thanks for this pr. You're right: an option to disable debugging is missing.
Unfortunately, there are two problems in your proposal:
- this line will break dev mode, because it prevents you from running necessary code in dev mode, not just debugging
- other debug points are missing in other parts of the library, like here
However, I don't like this "imperative" way of proceeding, that is, putting the condition for debugging at every point in the code: instead, a refactoring of the debug method would be necessary to accept a new parameter for enabling/disabling, and changing or adding a new method for this kind of debugging.
Let me know if you have time to complete this pr, otherwise I will do so when possible.
Thank you
@robisim74, updated pr
@mhuretski Perfect! Thanks again!