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

logrotate logfile on EL6 - fixes #14 & #15 #20

Merged
merged 1 commit into from
Nov 12, 2015
Merged

Conversation

duritong
Copy link
Collaborator

consul logs by default to STDOUT which is captured by systemd on
newer systems. On a sysv-init based system - like EL6 - we redirect
that to our own logfile. Which then just grows continously. As
enabling logging to syslog in consul does not silence output
to stdout, we would now log twice. So on these systems we should
logrotate that logfile to avoid growing the file endless.

@duritong
Copy link
Collaborator Author

This is the successor of #19 as we can't silence consul on STDOUT and hashicorp recommends to deal with that through external tools: hashicorp/consul#261

consul logs by default to STDOUT which is captured by systemd on
newer systems. On a sysv-init based system - like EL6 - we redirect
that to our own logfile. Which then just grows continously. As
enabling logging to syslog in consul does not silence output
to stdout, we would now log twice. So on these systems we should
logrotate that logfile to avoid growing the file endless.
@phrawzty
Copy link
Collaborator

I don't run Consul on any EL6 machines, so I am not necessarily authoritative, but based on the content of hashicorp/consul#261 this PR seems reasonable. 😄

r+

@duritong
Copy link
Collaborator Author

So finally I was able to verify that this works properly. And although I'm not a fan of merging my own PRs it seems that I am the only one that needs this, so I'm going to merge it now.

duritong added a commit that referenced this pull request Nov 12, 2015
@duritong duritong merged commit 6ceda49 into master Nov 12, 2015
@duritong duritong deleted the logrotate_on_el6 branch November 12, 2015 09:11
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