Vuesax: Vuesax logs debug information to the console

Created on 8 Jul 2018  路  7Comments  路  Source: lusaxweb/vuesax


My system:

  • Arch Linux
  • NodeJS 10.5.0 (using NVM) & NPM 6.1.0 & Yarn 1.7.0
  • Vuesax version 3.1.36
  • Chrome 67

While testing Vuesax out as a candidate for our next project, I noticed that certain components (such as the Select) component log to the console.
Skimming through the PR and the issues I've noticed that there's been a PR already to have the logs removed from the output, and that there's at least one more I've seen pending that removes another console log from the codebase.

Doing a quick search (running grep -rnw './src' -e 'console') of the codebase reveals that there's still a bunch of entries in the codebase, though most of them are commented out.

Personally I find (seemingly) random output in the console when I'm developing very annoying since it's not from any of my code and doesn't add any value (especially if it's logging stuff like this.$children>>>>>> Array(0)) and it would be a dealbreaker for me against Vuesax which looks like an otherwise very promising candidate.

My suggested solutions are these:

  • usage of the appropriate console methods: use console.debug for debug information since it's hidden by default by most browsers and avoid console.log which will appear in any log level (Chrome for example allows configuring the log level as shown in the screenshot below). This would help but it's not ideal because you'd still be logging to the console and it would annoy me (and I suspect a lot of other developers).
  • have the console calls removed at compile time (using a tool like this). I personally think this is the best solution; it would allow the usage of console during development of Vuesax where it adds value to print variables from time to time, but when it's used in an application where it's logging is irrelevant it would be removed from the actual code (as a bonus, the codesize will shrink with a few bytes ;))

I would not mind putting together a PR that explores having all console calls removed from the compiled sources (leaving console.warn etc in place since they convey information that might be effectively usefull to the developer).

1531078306

PS: I really like Vuesax so far, keep up the good work!

enhancement good first issue help wanted

Most helpful comment

I will try getting started on a PR by the end of the week then, when work quiets down a little.

I'll keep this open to track progress?

All 7 comments

The truth is that the console.log that are in this moment in the components can be totally eliminated you can do if you want a PR eliminating them

Thank you very much we will continue working and improving

I will try getting started on a PR by the end of the week then, when work quiets down a little.

I'll keep this open to track progress?

Excellent, thank you very much for the contribution

All the console.log found were removed and an esLint was added to report an error when finding one, thank you very much

if you find a console without problem you can make a PR to remove it

Please you still have more console logs in vsTextArea

all components were searched and the console removed

Thank you very much and if there is one that escapes me please let me know

@luisDanielRoviraContreras wouldn't it be interesting to have linting tools in place to prevent this kind of issues from recurring?
Your comment form July gave me the impression ESLint was configured to catch these errors, how do they make it into releases again?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

webafra picture webafra  路  3Comments

Cuacha07 picture Cuacha07  路  3Comments

jbienesdev picture jbienesdev  路  3Comments

jsinhSolanki picture jsinhSolanki  路  3Comments

mjmnagy picture mjmnagy  路  3Comments