Skip to content
This repository has been archived by the owner on Dec 8, 2017. It is now read-only.

Fix logrotate issue with logs going to wrong file #46

Merged
merged 1 commit into from
Oct 1, 2015

Conversation

mbland
Copy link
Contributor

@mbland mbland commented Oct 1, 2015

Noticed that there was a new /var/log/18f-pages-server/pages.log file, but
that the logs were still going to an uncompressed
/var/log/18f-pages-server/pages.log.1. The old postrotate script wasn't
actually successfully restarting the server, and a manual restart also didn't
allow the new process to write to the new log file.

Found out about the copytruncate directive, which will work well enough for
18F Pages, though it's not completely ideal. For more information, this issue
has a very helpful comment with a ton of technical background:

foreversd/forever#106 (comment)

Noticed that there was a new `/var/log/18f-pages-server/pages.log` file, but
that the logs were still going to an uncompressed
`/var/log/18f-pages-server/pages.log.1`. The old `postrotate` script wasn't
actually successfully restarting the server, and a manual restart also didn't
allow the new process to write to the new log file.

Found out about the `copytruncate` directive, which will work well enough for
18F Pages, though it's not completely ideal. For more information, this issue
has a very helpful comment with a ton of technical background:

foreversd/forever#106 (comment)
@mbland mbland added the bug label Oct 1, 2015
mbland added a commit that referenced this pull request Oct 1, 2015
Fix logrotate issue with logs going to wrong file
@mbland mbland merged commit 436b7e5 into 18f-pages Oct 1, 2015
@mbland mbland deleted the fix-logrotate branch October 1, 2015 12:25
nihonjinrxs pushed a commit to nihonjinrxs/data-driven-government that referenced this pull request Jul 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant