I try to keep console.log clean so I use console.debug and console.info when possible but how can I make it so that console.group logs to info or debug. It keeps putting an empty group in log. I don't see any option to change it to output somewhere else.
As best I can tell, it's not specifically meant to work that way according to the specification (which is more concerned with interactivity and is light on other details):
https://console.spec.whatwg.org/#grouping
In practice, a group can contain different types of output (so for instance, info and debug) so I think the intention here is to make groups useful to specific actions (so group all this console output for this function) so having a group header that is always visible makes some sense. Not sure if that is helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With