Console logs do not have a level associated with them, so you have no way to run your app with only error logs, or with debugging information. That makes it easy to not only write bad logs, but to get to a situation where you can't remove a bunch of related but distributed logs without some effort. Basically, logging without levels and organisation leads to bad code hygiene.
Yes but that’s not very versatile. A good logger usually has multiple channels, separate from levels so you can categorize logs on the process you’re actually trying to debug.
You can create any kind of grouping with console.group and console.groupEnd() if thats whag you mean, otherwise you either mean separate files or prefixed messages.
Which you can easily extend the console object to do, which you would extend by using one of the levels I mentioned.
If you mean to separate files, that's by definition not what the console is for.
Neither of which are a part of yourthe original argument~~, so you're moving the goalposts here. But okay~~.
5
u/FrancisStokes Dec 17 '18
Console logs do not have a level associated with them, so you have no way to run your app with only error logs, or with debugging information. That makes it easy to not only write bad logs, but to get to a situation where you can't remove a bunch of related but distributed logs without some effort. Basically, logging without levels and organisation leads to bad code hygiene.