nomiddlename/log4js-node — pull request #200 by lulurun (2014-04-21 08:22:16+00:00)
Title: file won't get rolled if the process restarted daily

The dateFile appender works fine for server processes, I found the problem when I use it in a daily cron job.

this.lastTimeWeWroteSomething is inited with current time, so if we restart a process on a daily base, it will always return the same date string,
=> The log file will never get rolled and it will keep growing.

The fix is done by checking existing log file, if there is one then get lastTimeWeWroteSomething from the file stat.