Skip to content

Commit

Permalink
[refactor doc] Document cli.startDaemon and cli.cleanLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki authored and indexzero committed Nov 23, 2011
1 parent 93482cb commit 93359eb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,23 @@ function getOptions(file) {
return options;
}


app.cmd('cleanlogs', function () {
//
// ### function cleanLogs
// Deletes all historical forever log files
//
app.cmd('cleanlogs', cli.cleanLogs = function () {
forever.log.silly('Tidying ' + forever.config.get('root'));
forever.cleanUp(true).on('cleanUp', function () {
forever.log.silly(forever.config.get('root') + ' tidied.');
});
});

//
// ### function start (file)
// #### @file {string} Location of the script to spawn with forever
// Starts a forever process for the script located at `file` as daemon
// process.
//
app.cmd(/start (.+)/, cli.startDaemon = function (file) {
forever.log.info('Forever processing file: ' + file.grey);
var options = getOptions(file);
Expand Down

0 comments on commit 93359eb

Please sign in to comment.