nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.59k stars 145 forks source link

Add self-explaining no-colour and no-prefix arguments #190

Closed ltsampros closed 7 years ago

ltsampros commented 7 years ago

Useful for situations where log draining/processing cannot be controlled (e.g. heroku)

nickstenning commented 7 years ago

Thanks for this patch! I'm very happy to merge support for these flags. Do you think you could add some tests for this functionality in test_printer.py?

ltsampros commented 7 years ago

Sure thing. I'll send patches later.

On 25 Mar 2017 15:47, "Nick Stenning" notifications@github.com wrote:

Thanks for this patch! I'm very happy to merge support for these flags. Do you think you could add some tests for this functionality in test_printer.py ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nickstenning/honcho/pull/190#issuecomment-289219986, or mute the thread https://github.com/notifications/unsubscribe-auth/AG6xAlQqxzrvJOjfcS4iqZ9F7OJsI2qAks5rpTcqgaJpZM4MpCtX .

ltsampros commented 7 years ago

@nickstenning The logic fix just bypasses colouring completely if prefix is disabled -- no unnecessary call to _colour_string().

Added 3 testcases for tty (disable prefix, disable colour and both) and 1 for non-tty output (disable prefix). I think all of the cases are handled.

I didn't notice any suitable place for documenting command line options but please let me know if you need any further documentation. Also, should I squash these two three commits?

nickstenning commented 7 years ago

LGTM. No need to squash these.

There's a couple of things now pending a release, so I'll try and get that done later this week.

nickstenning commented 7 years ago

Thank you! 🎉