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

Append logs to file and rotate logs #43

Merged
merged 5 commits into from
Mar 9, 2022

Conversation

janniklasrose
Copy link
Contributor

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

As discussed in #31, this now logs the output of /app/duck.sh by appending to /config/duck.log instead of overwriting it. A cronjob for logrotate is used to avoid excessive file sizes of the log file.

Benefits of this PR and context:

When using LOG_FILE=true, the expectation is that it logs the history to a file instead of the current status.

How Has This Been Tested?

I have tested logrotate in a local docker-duckdns image on macOS (M1) with a simulated large duck.log file.

Source / References:

@project-bot project-bot bot added this to PRs & in progress issues in Issue & PR Tracker Feb 23, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for opening this pull request! Be sure to follow the pull request template!

@janniklasrose
Copy link
Contributor Author

I have chosen the parameters in /app/logrotate.conf somewhat arbitrarily - 5 rotations at 100k file size each. Compression is enabled because the logs compress well.

@aptalca aptalca self-assigned this Feb 23, 2022
Issue & PR Tracker automation moved this from PRs & in progress issues to Team approved, ready for merge Mar 9, 2022
@aptalca aptalca merged commit b0882b1 into linuxserver:master Mar 9, 2022
Issue & PR Tracker automation moved this from Team approved, ready for merge to Done Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants