本文整理汇总了PHP中SysLog::debug方法的典型用法代码示例。如果您正苦于以下问题:PHP SysLog::debug方法的具体用法?PHP SysLog::debug怎么用?PHP SysLog::debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SysLog
的用法示例。
在下文中一共展示了SysLog::debug方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionTest
public function actionTest()
{
SysLog::info(__METHOD__, __CLASS__);
$response = $this->argv['response'];
$res = (yield $this->test());
SysLog::debug(__METHOD__ . " res == " . print_r($res, true), __CLASS__);
$response->end(" test response 16" . print_r($res, true));
(yield Swoole\Coroutine\SysCall::end('test for syscall end'));
}
示例2: loop
public static function loop()
{
\SysLog::info(__METHOD__, __CLASS__);
/*
遍历自己的数组,发现时间超过预定时间段,且该IO的状态依然是未回包状态,则走超时逻辑
*/
foreach (self::$event as $socket => $e) {
$now = microtime(true);
\SysLog::debug(__METHOD__ . " key == {$socket} now == {$now} timeout == " . $e['timeout'], __CLASS__);
if ($now > $e['timeout']) {
self::del($socket);
$cli = $e['cli'];
$cli->close();
call_user_func_array($e['callback'], $e['params']);
}
}
}
示例3: loop
public static function loop()
{
\SysLog::info(__METHOD__, __CLASS__);
/*
遍历自己的数组,发现时间超过预定时间段,且该IO的状态依然是未回包状态,则走超时逻辑
*/
foreach (self::$event as $socket => $e) {
\SysLog::debug(__METHOD__ . " key == {$socket} ", __CLASS__);
$res = time() - $e['timeout'] - self::LOOPTIME;
if ($res >= 0) {
self::del($socket);
$cli = $e['cli'];
$cli->close();
call_user_func_array($e['callback'], $e['params']);
}
}
}
示例4: parseHeader
/**
* [parseHeader description]
* @param [type] $headerBuf [description]
* @return [type] [description]
*/
private function parseHeader($data)
{
/*
version + status_code + message
*/
$parts = explode("\r\n\r\n", $data, 2);
$headParts = explode("\r\n", $parts[0]);
if (is_string($headParts)) {
$headParts = explode("\r\n", $headParts);
}
if (!is_array($headParts) || !count($headParts)) {
//TODO header buffer valid
return false;
}
list($this->rspHeaders['protocol'], $this->rspHeaders['status'], $this->rspHeaders['msg']) = explode(' ', $headParts[0], 3);
unset($headParts[0]);
foreach ($headParts as $header) {
$header = trim($header);
if (empty($header)) {
continue;
}
$h = explode(':', $header, 2);
$key = trim($h[0]);
$value = trim($h[1]);
$this->rspHeaders[strtolower($key)] = $value;
}
if (isset($parts[1])) {
$this->buffer = $parts[1];
}
\SysLog::debug(__METHOD__ . " header == " . print_r($this->rspHeaders, true), __CLASS__);
return true;
}