MagicMirror Forum

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

    PM2 disable logs

    Troubleshooting
    2
    3
    7341
    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
      Chiumanfu last edited by

      My mirror is at a stable state and I’d like to disable logs. Reason is I have the MMM-SimpleLogo module displaying a live feed from a Foscam IP camera. This camera is notorious for having jpg errors and every frame generates an error in the log. This builds up very fast.

      I’ve looked at the page http://pm2.keymetrics.io/docs/usage/log-management/ and they state the following will disable logs

      {
        "out_file": "/dev/null",
        "error_file": "/dev/null"
      }
      

      but I have no idea where to insert that snippet.

      Thanks

      1 Reply Last reply Reply Quote 0
      • bhepler
        bhepler Project Sponsor last edited by

        From the page you linked:

        Options:
        --merge-logs                 do not postfix log file with process id
        --log-date-format    prefix logs with formated timestamp
        -l --log [path]              specify entire log file (error and out are both included)
        -o --output            specify out log file
        -e --error             specify error log file
        

        So…

        pm2 stop mm
        pm2 start mm -o "/dev/null" -e "/dev/null"
        pm2 save
        
        1 Reply Last reply Reply Quote 1
        • C
          Chiumanfu last edited by

          Thanks bhpler!

          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