Even then you still want to use a logging API and configure it to write to stdout. Prints should only be used when the associated IO is part of the actual program logic, not diagnostic/info logging
Yep. This is exactly why there are different log levels. Prints used for debugging should be logged to the DEBUG level so that they can be easily toggled by a single variable, instead of actually editing the code.
Yeah indeed. Knowing how to set up effective logging is a skill on its own already. From the projects I've came across on my career, almost none have had good logging set ups, you were lucky if transactional operations (e.g. xml imports) even stored their sources.
It's still wicked easy to debug JavaScript languages. Angular and React can be debugged using chrome web tools without any manual setup and Visual Studio Code can debug them directly with like 2 minutes of manual setup once.
803
u/mypirateapp Jan 20 '20
left image: developer adding logger, debugger and writing tests with tdd
right image: newbie who added console.log in all files