Skip to content

Remove console.log statements

We are using the de-frontend-framework, especially the Demap component, for a project at the GFZ (Earthquake Event Explorer) and it would be helpful for us to remove the console.log statements from the components since it makes quite some noise and if I debug a problem using console.log my messages are harder to find. Also for production deployments it is not ideal to display such internal information.

I would see one of the following as an improvement for this:

  • remove all console.log statements completely (a developer is still possible to change the code in node_modules and debug the DE components in the specific project)
  • add some kind of global debug switch variable which can be enabled if needed by the developer
  • maybe use a library for logging, so that there are log levels too (like TRACE, INFO, DEBUG ...)

image

Edited by Matthias Rüster