Skip to content

feat: log rotation for stdout/stderr #953

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

Merged
merged 1 commit into from
Aug 25, 2022
Merged

feat: log rotation for stdout/stderr #953

merged 1 commit into from
Aug 25, 2022

Conversation

maparr
Copy link
Contributor

@maparr maparr commented Aug 19, 2022

It closes #680

How it works
We have a log file for the Spacemesh node, based on node config. Checking every 30m file size and compress old logs to a separate file and clean up current one, rotate logs when the file will reach file size limit, right now 500 mb.

Why I didn't use https://www.npmjs.com/package/node-log-rotate
This solution for log and for rotation, we need only rotate log file, because we're logging with electron-log and second painful moment, they creating log file for us, based on timestamp and deleting this file based on this date time, we have different logic for our logs

Demo:

Screen.Recording.2022-08-19.at.22.40.35.mov

- log rotation for smapp stdout/stderr
@maparr maparr mentioned this pull request Aug 19, 2022
@maparr maparr requested a review from brusherru August 19, 2022 21:53
@maparr maparr self-assigned this Aug 22, 2022
Copy link
Member

@brusherru brusherru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@maparr maparr merged commit 8c9017a into develop Aug 25, 2022
@maparr maparr deleted the feat/log-rotation branch August 25, 2022 12:25
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

Successfully merging this pull request may close these issues.

Log rotation
2 participants