MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED Log.log doesn't work in Module

    Troubleshooting
    2
    4
    92
    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
      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
        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

        Create a working config
        How to add modules

        C 1 Reply Last reply Reply Quote 0
        • C
          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
            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

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy