node-startup icon indicating copy to clipboard operation
node-startup copied to clipboard

add option to open log file in "append" mode

Open mwittig opened this issue 7 years ago • 0 comments

It would be nice to have an option to open the log file in "append" mode (">>") rather than "open" mode (">") for the following reasons:

  • for some applications it is desirable to keep the log file when the service is restarted. With the "open" mode the log file is overwritten each time when the service is started/restarted.
  • using the append mode allows for simple log-rotation in "copytruncate" mode. While "copytruncate" does not always fit as you may loose some bytes of log-data during rotate, it comes handy if you don't want to restart the service after log rotation. The latter seems to be the only choice with node-startup as it does not support handling for the "HUP" signal to reopen the log file (which would be tricky anyway).

mwittig avatar Jan 30 '18 16:01 mwittig