-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Log file option #261
Comments
Implementing different logging destinations in an application is generally not a good idea, IMO. There are many different requirements by different environments that could be easily (and should be) done by separate tools. |
The stock logrotate can also perform a copy/truncate operations which is friendlier to a process that keeps the output file open. |
Thanks, I didn't know copy+truncate in logrotate. That's an option. And in that case this is just a "nice to have". The main reason I filed an issue is because it was part of the request in #105 but was not implemented there. |
Agreed. For now, we'd prefer this problem to be handled outside of Consul using external tools. |
Document aclBindingRuleSelector
* Changelog for 0.15.0 release
Syslog support was added in #105 but that issue also asked for a log file option. I'd like this also.
Why do I want this? I'm in an old-school CentOS 5 & 6 init.d based environment. Snazzy new things like systemd and upstart aren't available which probably do a good job of capturing stdout/stderr to a file. runit is a possibility but I'm not thrilled about building and installing that just for Consul.
So what's exactly the problem? I can only log to a file now through appending stdout & stderr to a file and backgrounding the Consul process. Works great... until I want to use logrotate to rotate that file. I realized the only way I can release the file handle is a hard restart of Consul. That's not ideal, but possible. And then I realized, if I want to rotate logs regularly by time instead of size, all of my Consul agents could potentially be hard restarted at the same time by logrotate in order to release the file handle. Ouch.
I'm using syslog as a workaround, and perhaps could have syslogd log to a different file, but an explicit log file would be far simpler.
The text was updated successfully, but these errors were encountered: