You may optionally format the string with ANSI codes by
passing additional parameters using the constants defined in [[\yii\helpers\Console]].
Example:
$this->stderr('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
/** * If in daemon mode - no write to console * * @param string $string * * @return int */ public function stderr($string) { if (!$this->demonize && is_resource(\STDERR)) { return parent::stderr($string); } else { return false; } }