Skip to content
This repository was archived by the owner on Aug 29, 2026. It is now read-only.
This repository was archived by the owner on Aug 29, 2026. It is now read-only.

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

Description

@mwittig

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions