Forever 总是有自己的日志文件吗?我正在运行以下进程:
data: uid command script forever pid id logfile uptime
data: [0] staff-intranet /usr/bin/node staff-intranet-server.js 24123 26733 /root/.forever/logfile.txt 0:0:10:47.967
但是,我的配置文件如下所示:
// Staff Intranet Configuration File
{
"uid": "staff-intranet",
"append": true,
"script": "staff-intranet-server.js",
"sourceDir": "/path/to/file/staff-intranet",
"outFile": "/path/to/file/staff-intranet/output.txt",
"errFile": "/path/to/file/staff-intranet/errors.txt",
"logFile": "/path/to/file/staff-intranet/logs.txt"
}
但日志文件仍然存储在存储列表中/root/.forever/logfile.txt
。为什么它不被存储在/path/to/file/staff-intranet/logs.txt
?
答案1
你可以输入:
-p /path/to/file/staff-intranet/
将所有永久相关文件(pid 文件等)的基本路径放在