MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Log.log doesn't work in Module

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    4 Posts 2 Posters 777 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      cldparisi
      last edited by

      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 ):
      3a7b375a-f32f-49bc-aa73-3131c04b77a7-image.png

      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 work

      What am I doing wrong?

      Thanks

      S 1 Reply Last reply Reply Quote 1
      • S Offline
        sdetweil @cldparisi
        last edited by

        @cldparisi correct… Log. is a client side function (in modulename.js) , NOT a node_helper.js server side function

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          cldparisi @sdetweil
          last edited by

          @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?

          S 1 Reply Last reply Reply Quote 1
          • S Offline
            sdetweil @cldparisi
            last edited by

            @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.

            see https://github.com/sdetweil/MMM-Logging

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0

            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
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy