MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

PM2 disable logs



  • 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



  • 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
    


  • Thanks bhpler!