增加Log类测试

This commit is contained in:
thinkphp
2016-02-29 10:29:52 +08:00
parent e7ed4be654
commit 9496e4a42e
8 changed files with 108 additions and 37 deletions

View File

@@ -48,10 +48,16 @@ class Socket
}
}
/**
* 日志写入接口
* @access public
* @param array $logs 日志信息
* @return bool
*/
public function save(array $logs = [])
{
if (!$this->check()) {
return;
return false;
}
$runtime = number_format(microtime(true) - START_TIME, 6);
$reqs = number_format(1 / $runtime, 2);
@@ -112,7 +118,7 @@ class Socket
} else {
$this->sendToClient($tabid, $client_id, $logs, '');
}
return true;
}
/**