Read the statement by Michael Teeuw here.
Log.log doesn't work in Module
-
Hi all,
Log.log is the module side (client) and console.log in the NodeJs side (server).
But in log file there are only Log,log message from default Module (calendar, newsfeed…), for example there aren.t message from MMM-CECControl, MMM-MotionControl, MMM-AlexaControl.
in documentation ( https://docs.magicmirror.builders/development/logger.html ):
in MMM-CECControl.js (for example) there is Log.log(…) but in its node_helper.js ther isn’t the require, I add: const Log = require(“…/…/js/logger.js”);
but it doesn’t change, there aren’t errors butLog doesn’t workWhat am I doing wrong?
Thanks
-
@cldparisi correct… Log. is a client side function (in modulename.js) , NOT a node_helper.js server side function
-
@sdetweil ok, ok…logger.js is only a wrapper to use console “like Log” with a same syntax.
How I can view a client Log?
is there a script or a module that write a file? -
@cldparisi open the developers window ctrl-shift-i on the keyboard and select the console tab
MMM-Logging can capture and send to the stdout stream to merge w the output from the node_helper(s)
I made some extensions to capture the other outputs, not just log.