MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    UNSOLVED notifications & logging

    Troubleshooting
    2
    6
    207
    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.
    • BKeyport
      BKeyport Module Developer last edited by

      I’m having a heck of a time understanding how to even START getting notifications…

      In my module, I have the very basic of notification received routines.

      notificationReceived(notification, payload, sender) {
                  Log.info('I See You');
                  },
      

      It’s not logging. I place log statements elsewhere, and no logging is occurring anywhere.

      So, I guess, I need help to figure out how to trigger logs correctly, and then how to actually get notifications.

      Anyone wanna tackle this?

      The "E" in "Javascript" stands for "Easy"

      S 2 Replies Last reply Reply Quote 0
      • S
        sdetweil @BKeyport last edited by sdetweil

        @BKeyport those are in the front end modulename.js, so those entries are in the dev window console.

        you can use MMM-Logging to capture and save those to stdout from npm start

        my fork also captures warn, error and info
        and can capture from browser on remote machine
        https://github.com/sdetweil/MMM-Logging

        Sam

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • S
          sdetweil @BKeyport last edited by

          @BKeyport there are a flood of notifications happening

          Sam

          Create a working config
          How to add modules

          BKeyport 1 Reply Last reply Reply Quote 0
          • BKeyport
            BKeyport Module Developer @sdetweil last edited by

            @sdetweil I see that. How to get the log to go to the log visible to pm2 logs?

            The "E" in "Javascript" stands for "Easy"

            S 2 Replies Last reply Reply Quote 0
            • S
              sdetweil @BKeyport last edited by

              @BKeyport have to add the MMM-Logging module

              Sam

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • S
                sdetweil @BKeyport last edited by sdetweil

                @BKeyport ther are two logs

                the node_helper logs to stdout from npm start or pm2 (which does an npm start via the script pm2 starts)

                the modulesname.js runs in the browser and logs to the browser log

                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