kohana / minion

Everyone loves having a minion they can boss around
113 stars 76 forks source link

Use STDOUT instead of echo #14

Closed zeelot closed 13 years ago

zeelot commented 13 years ago

I think STDIN/STDOUT/STDERR are the conventions for input and output when working with CLI.

fwrite(STDOUT, "Some output\n");

This tutorial seems pretty decent and has some reasons to use STROUT instead of echo: http://articles.sitepoint.com/article/php-command-line-1 What do you guys think?

BRMatt commented 13 years ago

I agree that echo isn't ideal, I've only been using it as a temporary solution and intend to implement some kind of logging agent (see #5) so that

a) Tasks can provide feedback while they're running (i.e. print a migration's name as soon as it's finished) b) It would make it easier to run tasks programatically & record their output

kiall commented 13 years ago

instead of fwrite(STDOUT, ..) etc ..

http://kohanaframework.org/guide/api/Kohana_Log_StdOut http://kohanaframework.org/guide/api/Kohana_Log_StdErr

BRMatt commented 13 years ago

Closing this in favour of #5

BRMatt commented 13 years ago

See :feature/5-logging-agent for a rough implementation