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

RES-1976 Tidy up old Discourse log files #737

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

edwh
Copy link
Collaborator

@edwh edwh commented Aug 5, 2024

We're using Monolog for Discourse API logging, which doesn't have built-in compression and deletion - see Seldaek/monolog#1202

This PR is a way of deleting old log files. It feels a bit clunky - there might be a better way to do it - but it works.

@edwh edwh requested a review from restart-neil August 5, 2024 11:09
@ngm
Copy link
Contributor

ngm commented Aug 8, 2024

I'm fine with this, but for reference I believe there is a 'days' parameter on the 'daily' log driver, which you can use to specify many days of logs to keep.

https://betterstack.com/community/guides/logging/how-to-start-logging-with-laravel/#understanding-channel-drivers

@edwh
Copy link
Collaborator Author

edwh commented Aug 12, 2024

I think you're right, and it would just be tech debt to do it the way I've done it. So I'll rework.

Copy link

@edwh edwh merged commit fcaa6d6 into develop Aug 12, 2024
2 of 3 checks passed
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.

2 participants