Add config for app's log and error log for PM2.

{
"apps": [{
"name": "App1",
"script": "app1/server.js",
"log_file": "log/app1.log",
"error_file": "log/app1-err.log"
},{
"name": "App2",
"script": "app2/server.js",
"log_file": "log/app2.log",
"error_file": "log/app2-err.log"
}]
}

If on Linux & Mac, you might want to enable 'node' user's permission for writing logs.

[Whole Web, Node.js PM2] Loggin with PM2的更多相关文章

  1. [Whole Web] [Node.js, PM2] Controlling runaway apps using pm2

    shows how to enable features in your pm2 config file that allow you to prevent runaway apps from bri ...

  2. [Whole Web] [Node.js] [Browserify] [Grunt] Automation task with grunt-browserify & grunt-contrib-watch

    What we want is when the server side Node.js files have been changed, we want to use browserify to b ...

  3. [Whole Web, Node.js, PM2] Configuring PM2 for Node applications

    In this lesson, you will learn how to configure node apps using pm2 and a json config file. Let's sa ...

  4. [Whole Web, Node.js, PM2] Restarting your node.js app on code change using pm2

    Aadd watch to the config.json file: { "apps": [{ "name": "App1", " ...

  5. [Whole Web] [Node.js] Using npm run to launch local scripts

    npm run allows you to configure scripts inside of your package.json file which can access locally in ...

  6. [Whole Web, Nods.js, PM2] Passing environment variables to node.js using pm2

    learn how to pass environment variables to your node.js app using the pm2 config file. This is usefu ...

  7. Node.js入门(含NVM、NPM、NVM的安装)

    本文最初发表于博客园,并在GitHub上持续更新前端的系列文章.欢迎在GitHub上关注我,一起入门和进阶前端. 以下是正文. Node.js的介绍 引擎 引擎的特性: JS的内核即引擎.因为引擎有以 ...

  8. 转载--- 写给Node.js学徒的7个建议

    贴士 1: 在开发环境使用nodemon,在生产环境使用pm2 当你第一次开发Node.js应用的时候, 其中一件事情就是一次又一次的运行[file].js 就和揭伤疤一样. 当我第一次开发的node ...

  9. VPS 运行 Node.js 的一些经验

    VPS 系统选择 各系统安装难易对比 Ubuntu.Debian 较为简单,CentOS 稍麻烦,32位系统比64位更节省内存 DigitalOcean 甚至推出了 Ubuntu + Node.js ...

随机推荐

  1. hdu4432 Sum of divisors(数论)

    Sum of divisors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  2. 关于mIdleHandlers 空闲消息

    模拟情况说明 创建一个handler对象 该handler持有的是主线程 1.先发送一个延时20秒的message what=35;2.紧接着又发送一个延时10秒的Runnable3.在该Runnab ...

  3. 存储过程中“Select Top 变量”的问题如何解决

    在SqlServer2005中,可以这样: DECLARE @p int SELECT TOP (@p) * FROM 表名 在SqlServer2000中,不支持以上方法,可以这样: DECLARE ...

  4. apache开源项目--ibatis

    iBATIS一词来源于“internet”和“abatis”的组合,是一个由Clinton Begin在2001年发起的开放源代码项目.最初侧重于密码软件的开发,现在是一个基于Java的持久层框架.i ...

  5. Java问题汇集(1)

    1.javax.el.PropertyNotFoundException: Property 'Price' not found on type pet.petshop.dto.WareDto 简答: ...

  6. OpenLayers 项目完整分析——(二)源代码总体结构分析

    转自:http://www.cnblogs.com/lzlynn/archive/2008/07/29/1255848.html 二)源代码总体结构分析 通过前面的项目介绍,我们大概已经知道Openl ...

  7. HDU-1026 Ignatius and the Princess I(BFS) 带路径的广搜

      此题需要时间更少,控制时间很要,这个题目要多多看, Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others)    Me ...

  8. FFT矩阵

    举个例子: \[{F_4}=\left[{\begin{array}{*{20}{c}}1&1&1&1\\1&i&{-1}&{-i}\\1&{- ...

  9. Fatjar成功安装记录

    1.FatJar安装方式 (1)在线安装 具体网址http://kurucz-grafika.de/fatjar (2)离线安装 将fatjar的jar放到plugins文件夹中,重启 2. 安装失败 ...

  10. 在Eclipse中使用Maven插件 博客分类: Java相关技术

    简介 本文介绍如何在Eclipse中通过maven插件编写java项目和web项目. 安装Maven 下载Maven最新版本,见:maven.apache.org/download.html 当前版本 ...