-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Let the supervisord daemon log to syslog. #162
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
Conversation
When the options ``stdout_logfile`` or ``stderr_logfile`` are set to "syslog", the children are logging to the syslog service, but the daemon is still logging to a file. By letting the possibility to set the value for ``logfile`` to "syslog", we can have the same behavior for the daemon.
|
This seems pretty useful to me, and simple too. I'm not sure why you'd want all children to log to syslog but not the daemon. Any reason it's not merged? |
|
+1 |
|
+1 I'd love to see this feature on |
|
But a little more configuration is needed, as the logname are not very usable: So the formatter needs to be changed too. |
|
A patch to full syslog support in supervisord, with better syslog formatting: |
|
Is it possible to get this into master? This would be a very useful feature. |
|
As a workaround, if you use rsyslog, from a certain version it is capable of monitoring log files. I set that up to send my logs to Loggly through rsyslog |
|
Hey folks, I've knocked together patches which enhance the support and also pass tests. If people want to go have a look at the other pull request (#289) and give feedback that would be lovely! In particular, the way stdout and stderr streams are logged is something I'd be curious to hear people's comments on. Do you think each stream should be sent with a unique tag? Or is an in-message prefix as currently written sufficient? |
|
I'm curious why this has not been accepted. It is a minor change and a desired feature. |
|
@mnaberez There doesn't seem to be another pull request with this feature. This has sat for 3 years and the functionality is already there for programs just not supervisord itself. |
|
@Siecje There's an alternate one right above and I've seen this in at least one other patch that includes this if not more. The syslog patches probably need to be reviewed together. |
|
Sure, here's your summary. I'm including it on this one because it's the oldest with that tag, and this is where the discussion is happening. This one: #162 - created by an ex-colleague of mine, @franckcuny - is where I started with my own PR. #446 is genuinely different and relates to remote syslog logging. This is especially important for docker users who are using supervisor as the top-level process in a container, because they don't have a 'syslog' daemon running locally. If you merge this PR, I'll submit a new one which cleans this up and allows it. Personally I think to be consistent you should either support syslog properly in core, or clearly deprecate it and instead point people to the plug-in. |
Note for future review: "my own PR" that @samv references above is #289. |
|
My recommendation - close #162, (optionally) release 4.0.0 with the changes in master, accept #289 which fixes #286, #334, and #563, and release that as a backward-incompatible release (4.0 or 5.0). Address #446 subsequently. The important thing here is to make releases on which people may rely and iterate and refine. Instead, we have lots of private forks that organizations are running because the functionality has not been released. |
It is unfortunate that the syslog changes are tied up with the changes on master. The master branch also has Python 3 support which is pretty broken right now (see issues tagged python 3) and not suitable to be released. An alternative might be to make a new 3.x release with the syslog changes. |
|
@mnaberez: A quick browse through those issues, some of them are specific to Python 3 (which is currently unsupported, so a release note stating that Python 3 is still not perfect should suffice), but others seem to be regressions brought about by the attempt at Python 3 support. I suggest we bisect those two failure modes and address the latter, bringing the master back to a stable state independent of supporting Python 3. I'd flag those issues as 'blocker' or similar. |
I'm not willing to release version of Supervisor that I know will crash hard with something as simple as a subprocess outputting a byte that is not valid UTF-8. That's far from an edge case. Companies run this software in production and don't always read all the details in the release notes. |
|
Merging this pull request is backward compatible. |
Fair enough. So hard fail when |
|
Hey folks, is there any update on this and all of the related syslog PRs? I'm trying to understand the best approach to output to syslog with my own preferred local facility but that functionality seems to have been locked up in one PR or another for several years now. I am not sure how to proceed, but it certainly seems like making yet another PR to add this functionality would not help matters. Any advice would be appreciated, thanks! |
|
+1 |
|
Docker container set log to nsyslog on host. Only supervisord write log files into container. |
|
+1 |
When the options
stdout_logfileorstderr_logfileare set to"syslog", the children are logging to the syslog service,
but the daemon is still logging to a file.
By letting the possibility to set the value for
logfileto"syslog", we can have the same behavior for the daemon.