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

Allow multiple log archive files #6055

Open
whiteMetalApe opened this issue Jul 8, 2024 · 1 comment
Open

Allow multiple log archive files #6055

whiteMetalApe opened this issue Jul 8, 2024 · 1 comment
Labels
new-feature-request Feature request that needs triage

Comments

@whiteMetalApe
Copy link

Problem

Currently, there is only one log archive file like node.archive.log, multiple log archives are not possible.
For example, if someone wants to have a daily/weekly/monthly log archive file, that would not be possible.

Solution

Option 1. Implement a configurable log rotation functionality to enable multiple log archive files.
Option 2. Establish compatibility with unix logrotate (log file has to be flushed upon SIGHUP signal, etc)

Dependencies

Urgency

@whiteMetalApe whiteMetalApe added the new-feature-request Feature request that needs triage label Jul 8, 2024
@onetechnical
Copy link
Contributor

onetechnical commented Oct 10, 2024

While it is true that there is not a timed rotation, you can rotate to multiple named files. For example:

    "LogArchiveMaxAge": "168h",
    "LogArchiveName": "node.log.{{.Year}}{{.Month}}{{.Day}}_{{.Hour}}{{.Minute}}{{.Second}}-{{.EndYear}}{{.EndMonth}}{{.EndDay}}_{{.EndHour}}{{.EndMinute}}{{.EndSecond}}.gz",
    "LogSizeLimit": 1073741824,

This will rotate when the log reaches 1 GB, date stamp them when they were rotated, and keep the past seven days.

Reference: https://developer.algorand.org/docs/run-a-node/reference/config/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature-request Feature request that needs triage
Projects
None yet
Development

No branches or pull requests

2 participants