Only the latest log was kept as node.log.old. Now, log files are
numbered (node.log.1, node.log.2 and so on). Also node.log is now
a hard link to the current log file. rad node stop will delete
node.log (note that node.log.x stays intact) and rad node start
will delete node.log before it creates node.log.y in case the node
crashed.
Also, when running in foreground mode, now a log file is created. It just contains the hint that the node was started in foreground mode, just to avoid confusion.
Only the latest log was kept as node.log.old. Now, log files are
numbered (node.log.1, node.log.2 and so on). Also node.log is now
a hard link to the current log file. rad node stop will delete
node.log (note that node.log.x stays intact) and rad node start
will delete node.log before it creates node.log.y in case the node
crashed.
Also, when running in foreground mode, now a log file is created. It just contains the hint that the node was started in foreground mode, just to avoid confusion.
REVIEW: using a more business logic approach
Flexing the sans-io muscles to capture the business logic around rotating the
log into a struct LogRotator.
The IO implementation is then captures in the LogRotatorFileSystem.