Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli/node: Improve log rotation
Merged lorenz opened 9 months ago

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.

lorenz opened with revision bc8a6e54 on base 010d5134 +56 -16 9 months ago

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.

fintohaps pushed revision 2 c853c61f on base 010d5134 +196 -29 9 months ago

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.

lorenz pushed revision 3 1cd49042 on base 3d352f23 +196 -29 8 months ago
lorenz merged revision 1cd49042 at 4934473b 8 months ago