乐闻世界logo
搜索文章和话题

What is the default location of PM2 log files?

1个答案

1

PM2 is a popular process manager for Node.js applications that helps manage and keep applications running. PM2 can generate log files recording the runtime status and detailed output of applications, which are invaluable for debugging and monitoring.

By default, PM2 stores its log files in the ~/.pm2/logs/ directory. Within this directory, each application managed by PM2 has its own log files, typically including a stdout log file and a stderr log file. For example, if your application is named app, you will find app-out.log for standard output and app-error.log for error output.

Additionally, PM2 provides several command-line options for viewing and managing log files. For example, the pm2 logs command can display all managed application logs in real-time, or use pm2 logs [app_name] to view logs for a specific application. These tools are highly convenient for daily log checks and troubleshooting.

2024年6月29日 12:07 回复

你的答案