nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.

Home Page:http://pypi.python.org/pypi/honcho

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Export to upstart and logging

mjumbewu opened this issue · comments

I'm interested in using the built-in log capturing and rotation in upstart with a honcho exported job. I like that you can, if you so desire, specify the folder to which to write logs, but upstart will do it better.

I'm considering a few different ways to do this and wanted to get opinions:

  • using tee to write to both stdout/stderr and the custom log file; this will have the unfortunate side-effect that you will have the same logs in two places, wasting disk space
  • accepting a special value for --log to indicate that you want to bypass file logging (maybe --log -)
  • ignoring the --log value in the template; then the script would just write to stdout/stderr and use the default upstart logging

I'm leaning toward the last option, even though it disregards the --log option and may break existing configurations that depend on the logs being written to a custom folder. I think there's more value in getting access to upstart's log compression and rotating.

Submitted pull requests for the first and last potential solution above. Of course, at least one should be rejected.

Thanks for this! I'll have a look at the two PRs in a couple of days when I have a free moment.

I agree that using Upstart's native logging is probably a better approach overall. We originally provided our own logging approach because Upstart on Ubuntu 10.04 didn't manage logs. Lucid is well out of support now so I think we can just go with #181 and a note that the change will be backwards-incompatible.

All done here, I think. Thanks again!