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.

    creating a logger to capture module console.log/Log.log output

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    5 Posts 2 Posters 872 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.
    • S Away
      sdetweil
      last edited by

      I have been fighting some crashes for a while, but using the dev window doesn’t help. it dies when Electron dies…

      I found this logger, and it has helped a LOT…

      thought others would be interested…

      you put the javascript in a file (I used js/logger.js)
      and then add the two lines to the index.html file (change the path/name of the logger.js file to match what you do)

      https://stackoverflow.com/questions/55032227/tips-on-solving-devtools-was-disconnected-from-the-page-and-electron-helper-di/56111557#56111557

      the log file will be in ~/.config/Electron/logs
      (note the leading dot on config)

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 2
      • lavolp3L Offline
        lavolp3 Module Developer
        last edited by

        So can we implement it into the code for all to use? What do you think?

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

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

          @lavolp3 one could submit a PR to include it… wouldn’t want it on all the time, as it will eat up disk space…

          MMM-Logging does similar , but always failed for me when the debugger failed…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          lavolp3L 1 Reply Last reply Reply Quote 0
          • lavolp3L Offline
            lavolp3 Module Developer @sdetweil
            last edited by

            @sdetweil Well, there should be a way to clear the log output once in a while!?
            I’ll test it as well…

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

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

              @lavolp3 one could just erase the files… its just a lot to learn for the newer folks, who are already swamped…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              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 Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy