Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to open log file in "append" mode #42

Open
mwittig opened this issue Jan 30, 2018 · 0 comments
Open

add option to open log file in "append" mode #42

mwittig opened this issue Jan 30, 2018 · 0 comments

Comments

@mwittig
Copy link

mwittig commented Jan 30, 2018

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant