/** * If in daemon mode - no write to console * * @param string $string * * @return bool|int */ public function stdout($string) { if (!$this->demonize && is_resource(STDOUT)) { return parent::stdout($string); } else { return false; } }
/** * Overridden method honors $quiet option to disable * all non-error output. * * @param string $string * @param bool $verbose If TRUE, message is considered as verbose * @param string|bool $timestamp If set, messages are timestamped by specified format or default format * * @return bool|int|string */ public function stdout($string, $verbose = false, $timestamp = false) { if (!$verbose || $this->verbose) { if ($timestamp) { $timestamp = is_string($timestamp) ? $timestamp : 'd-m-Y H:i:s'; $currentTime = date_create(); $string = "[{$currentTime->format($timestamp)}] {$string}"; } return !$this->quiet ? parent::stdout($string) : ''; } return ''; }