LOG-DEBUG mode

Description

Activate LOG mode where internal actions logs can be activated or deactivated

The idea is that every action can be easily tracked via logs in a way that can be activated/deactivated in Development mode.
This logging will be deactivated by default in production

This can be a great tool for learning and debugging purposes

Examples

Using something like https://www.npmjs.com/package/debug

More info


https://blog.bitsrc.io/logging-best-practices-for-node-js-applications-8a0a5969b94c

Thanks for suggesting this Juanma :slightly_smiling_face: Would this be part of the DevTools we are planning to work on in the future or is it something different?

Iโ€™m not sure whatโ€™s the best way of handling these log messages, if via terminal or via DevTools
Maybe via terminal is a good enough first step.

But by reading the DevTools FD I realized that we should wait for the hooks feature. Once the hooks feature is available, I think we should be able to implement a log for every process that can be hooked.

I think this is the way to go: implement a hook for every action/process that weโ€™d like to log so itโ€™s also available for some other logic implementation.

1 Like

Is this different than the DevTools FD?