Read the statement by Michael Teeuw here.
[MMM-Logging] Module for better Node.js console logging with Timestamps and Function Calls
-
Description:
This is a simple module which extends the Node.js console logging capabilities of the MagicMirror² project through implementation of the
tracer
Node.js module, including adding timestamps, call sources, and stack traces.By default, this module will intercept and format ALL
console
log messages from the MagicMirror instance once it is loaded so no additional changes need to be made to individual modules. If they log output using the standardconsole.log()
orconsole.error()
they will be reformatted and pretty printed.Examples:
Before MMM-Logging:
0|mm | Starting MagicMirror: v2.6.0-dev 0|mm | Loading config ... 0|mm | Loading module helpers ... 0|mm | Initializing new module helper ... 0|mm | Module helper loaded: MMM-Logging 0|mm | No helper found for module: alert.
After MMM-Logging:
0|mm | Starting MagicMirror: v2.6.0-dev 0|mm | Loading config ... 0|mm | Loading module helpers ... 0|mm | 2018-12-05T12:42:51 <log> Initializing new module helper ... (js/app.js:128 loadModule) 0|mm | 2018-12-05T12:42:51 <log> Module helper loaded: MMM-Logging (js/app.js:161 loadNextModule) 0|mm | 2018-12-05T12:42:51 <log> No helper found for module: alert. (js/app.js:163 )
Download:
[card:shbatm/MMM-Logging]
Current Version: 1.0.1 – CHANGELOG
-
Amazing! I have missed time stamps a lot when debugging. And now we get file and line nr too. Great work!
-
Updated to version [1.0.1] - now includes browser methods for formatting the DevTools console (disabled by default) and ability to echo Module Notifications and Errors from the web browser back to the Node (back-end) console and logs.