robisim74 / qwik-speak

Translate your Qwik apps into any language
https://robisim74.gitbook.io/qwik-speak/
MIT License
133 stars 15 forks source link

Debug messages in config #128

Closed mhuretski closed 5 months ago

mhuretski commented 5 months ago

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?

codesandbox[bot] commented 5 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

robisim74 commented 5 months ago

@mhuretski Thanks for this pr. You're right: an option to disable debugging is missing.

Unfortunately, there are two problems in your proposal:

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

mhuretski commented 5 months ago

@robisim74, updated pr

robisim74 commented 5 months ago

@mhuretski Perfect! Thanks again!