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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login