/** * notice,记录到日志 * @param string $msg * @param bool $display * @return void */ public static function notice($msg, $display = false) { Lib\Log::add("Server:" . trim($msg)); if ($display) { if (self::$serviceStatus == self::STATUS_STARTING && @posix_ttyname(STDOUT)) { echo $msg . "\n"; } } }
/** * 记录日志 * @param sring $str * @return void */ protected function notice($str, $display = true) { $str = 'Worker[' . get_class($this) . ']:' . $str; Lib\Log::add($str); if ($display && Lib\Config::get('workerman.debug') == 1) { echo $str . "\n"; } }
/** * notice,记录到日志 * @param string $msg * @param bool $display * @return void */ public static function notice($msg, $display = false) { Lib\Log::add("Server:" . $msg); if ($display) { if (self::$serviceStatus == self::STATUS_STARTING) { echo $msg . "\n"; } } }