如果我在 fork 模式下为节点 js 应用程序运行 pm2 进程,则会生成日志,但如果在 pm2 集群模式下运行,相同的应用程序不会提供日志
我正在使用下面的 pm2 生态系统文件来启动我的应用程序
module.exports = {
apps : [
{
name: 'test',
script: <entry_file_path>,
exec_mode: "cluster",
instances: 1,
autorestart: true,
watch: false,
combine_logs:true,
max_memory_restart: '1G',
exp_backoff_restart_delay: 1000,
merge_logs: true,
env: {
NODE_ENV: 'production'
}
}]
};
我正在使用 log4js v5.2.2 登录我的节点应用程序