Where is nodejs log file?

后端 未结 4 2071
故里飘歌
故里飘歌 2020-11-30 23:13

I can\'t find a place where nodejs log file is stored. Because in my node server I have \"Segmentation fault\", I want to look at log file for additional info...

4条回答
  •  抹茶落季
    2020-12-01 00:00

    forever might be of interest to you. It will run your .js-File 24/7 with logging options. Here are two snippets from the help text:

    [Long Running Process] The forever process will continue to run outputting log messages to the console. ex. forever -o out.log -e err.log my-script.js

    and

    [Daemon] The forever process will run as a daemon which will make the target process start in the background. This is extremely useful for remote starting simple node.js scripts without using nohup. It is recommended to run start with -o -l, & -e. ex. forever start -l forever.log -o out.log -e err.log my-daemon.js forever stop my-daemon.js

提交回复
热议问题