nodejitsu/forever-monitor — pull request #11 by brettpaden (2012-11-29 22:39:31+00:00)
Title: Rewrite of logger plugin in order to support date based log rotation

First pull request :-)

This is tied to a soon-to-be request to the base forever project (cli interface changes to support this) but not necessarily dependent on it . I'm sure I've overlooked some hooks or interface support, so please feel free to suggest changes or enhancements.

When used in conjunction with the base forever cli, this enhancement will automatically rotate child logs based on the formatting of the log file name.

For example, if I feed forever the following argument:

forever start -d -o /var/log/myapp-%Y%m%d.log myapp

It will start writing to a log called myapp-20121129.log. When the calendar rolls over to the 30th, forever will swap streams and start writing to myapp-20121130.log (within 30s of the date change, by default).