/** * @inheritdoc */ public function emergency($log, array $context = []) { if ($this->checkIgnoreList('emergency')) { return; } $context = $this->formatContext($context); Server::getCli()->darkGray($this->currentTime() . " EMERGENCY: {$log} {$context}"); }
/** * 打印帮助说明 * * @param string $startFile */ public static function printUsage($startFile) { Server::getCli()->yellow("\nUsage: php" . $startFile . " [ACTION]\n"); Server::getCli()->table([['ACTION' => 'start', 'DESC' => 'Start all services', 'EXAMPLE' => "php {$startFile} start"], ['ACTION' => 'stop', 'DESC' => 'Stop all services', 'EXAMPLE' => "php {$startFile} stop"], ['ACTION' => 'restart', 'DESC' => 'Restart all running services', 'EXAMPLE' => "php {$startFile} restart"], ['ACTION' => 'reload', 'DESC' => 'Reload all running services', 'EXAMPLE' => "php {$startFile} reload"], ['ACTION' => 'status', 'DESC' => 'Response current service status', 'EXAMPLE' => "php {$startFile} status"]]); }