Skip to content

Improve log retention #323

@knolleary

Description

@knolleary

We currently retain logs in a fixed sized buffer within the launcher. This means:

  1. the duration of retained logs depends on how noisy Node-RED is
  2. the logs are only available if the launcher is running - and any history is lost if the launcher itself is restarted (eg suspend/resume).

This high level issue is to identify a plan for improving the log retention. We can make use of the fact we now have persistent file storage available to the instances.

Proposal: Write logs to the persistent file system on the instance.

  • The file should be rotated daily
  • Only retain the last N days of logs (14/30 days... could be configurable in the future)
  • Provide API in the launcher to retrieve logs for a given time period - which can be restored from the log files (this will be a separate task needed by Time-based browsing of Instance logs flowfuse#5301 which I'll raise independently of this proposal.)
  • Log files will show up under the 'assets' view of the instance - a feature not a bug, so should be under a well-defined directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageNeeds looking at to decide what to dosize:M - 3Sizing estimation point

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions