-
Notifications
You must be signed in to change notification settings - Fork 631
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
Fixes #709. Add Standard- and StandardError log configuration for SystemD #717
base: main
Are you sure you want to change the base?
Conversation
Looks like the travis check is failing due to other reasons, not this PR as far as I understand it? @ddollar |
Do you know already when you have some time to give some feedback or merge it? @ddollar Thanks! |
Any update on this PR? As @lichtamberg said, the Travis build seems to have failed on something unrelated to the PR. Can we perhaps rerun this PR on Travis? |
Actually this PR is broken, since the official systemd standard uses
I didn't have time to change this and since only newer versions of systemd allow file logging (see systemd/systemd#7198) I cannot test it on my servers, since we have an older version installed. Will try to find some time to fix this and hope someone else can test it. Also the CLI integration doesn't work completely, or at least I didn't manage it to work correctly - will also try to fix it. |
Ok, I've fixed the CLI integration & file descriptor, added another test & updated documentation. |
I'm not sure we should add a new flag for error log files, as in other exports (ex
Source: https://github.com/ddollar/foreman/blob/master/data/export/supervisord/app.conf.erb We should probably do the same for |
For the record it looks like
I have
For the record, this is the customization I'm using now and it works fine with systemd v240+: # custom part to use file logging instead of syslog
# "append" option only works with systemd v240+
# https://github.com/ddollar/foreman/pull/717
StandardOutput=append:<%= log %>/<%= name %>.log
StandardError=append:<%= log %>/<%= name %>.log |
I've added options to configure the log entries for the systemd configuration.
I overwrote the export defaults in the SystemD class, to keep the behaviour of writing to syslog the same as before (before, syslog was called explicit in the systemd files directly) - so it should not break the default behaviour from before.
I also added 2 tests which pass fine.
Feel free to comment and merge, if everything is fine :)
Hope this PR is fine, it's my first one for this project :)