ddollar / foreman

Manage Procfile-based applications
http://ddollar.github.com/foreman
MIT License
6.04k stars 633 forks source link

Export for systemd ignores log flag #709

Open ClikeX opened 6 years ago

ClikeX commented 6 years ago

https://github.com/ddollar/foreman/blob/025de2a7218414e9c0ad964aef62221fcc440153/data/export/systemd/process.service.erb#L14

Systemd template ignores the log location provided with foreman export. Which makes me unable to set a custom location for the process. And in turn makes the flag seem useless.

Seems like an oversight to me, or is there a particular reason why it isn't included?

h0jeZvgoxFepBQ2C commented 6 years ago

@ddollar Are you willing to merge a PR when I add some options to configure SystemD parameters? Are there any wishes how these options should be named?

I think something like a --systemd prefix would be nice, like

foreman export systemd --systemd-StandardOutput=/var/log/mylog.log --systemd-StandardInput=/etc/myinput 

I'm not sure how to add these parameters to the Procfile though.. Maybe something like following?

webserver1: bundle exec rake sync_task SYSTEMD_StandardInput=... SYSTEMD_StandardOutput=...
h0jeZvgoxFepBQ2C commented 6 years ago

I've created a PR for this, by adding log and error_log options - feel free to give feedback or merge :)

andrewmcodes commented 5 years ago

@ClikeX is this still an issue?

simptive commented 4 years ago

Of-course, still an issue.

ClikeX commented 3 years ago

@andrewmcodes In the end our team ended up not using the systemd logs as much as initially intended. So yeah, I guess this is still an issue if you really want systemd to handle your logs.

It seems like @h0jeZvgoxFepBQ2C was nearly finished with https://github.com/ddollar/foreman/pull/717.