Skip to content

Commit

Permalink
Added third log file for saving in common folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugen Irklievskiy committed May 27, 2014
1 parent 05b5e14 commit 2e03bcf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tasks/forever-task.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
var forever = require('forever'),
path = require('path'),
logDir = path.join(process.cwd(), '/forever'),
logFile = path.join(logDir, '/out.log'),
outFile = path.join(logDir, '/out.log'),
errFile = path.join(logDir, '/err.log'),
logFile = path.join(logDir, '/log.log'),
commandName = 'node',
commandMap = {
start: startForeverWithIndex,
Expand Down Expand Up @@ -87,7 +88,8 @@ function startForeverWithIndex( index ) {
// 'forever start -o out.log -e err.log -c node -a -m 3 index.js';
forever.startDaemon( index, {
errFile: errFile,
outFile: logFile,
outFile: outFile,
logFile: logFile,
command: commandName,
append: true,
max: 3
Expand Down Expand Up @@ -167,8 +169,9 @@ module.exports = function(grunt) {
commandName = this.options().command;
if (this.options().logDir) {
logDir = path.join(process.cwd(), this.options().logDir) || logDir;
logFile = path.join(logDir, this.options().logFile || 'out.log');
outFile = path.join(logDir, this.options().outFile || 'out.log');
errFile = path.join(logDir, this.options().errFile || 'err.log');
logFile = path.join(logDir, this.options().logFile || 'log.log');
}

try {
Expand Down

0 comments on commit 2e03bcf

Please sign in to comment.