AlgoliaSearch\Client::getLogs PHP Méthode

getLogs() public méthode

Return last logs entries.
public getLogs ( integer $offset, integer $length = 10, mixed $type = 'all' ) : mixed
$offset integer Specify the first entry to retrieve (0-based, 0 is the most recent log entry).
$length integer Specify the maximum number of entries to retrieve starting at offset. Maximum allowed value: 1000.
$type mixed
Résultat mixed
    public function getLogs($offset = 0, $length = 10, $type = 'all')
    {
        if (gettype($type) == 'boolean') {
            //Old prototype onlyError
            if ($type) {
                $type = 'error';
            } else {
                $type = 'all';
            }
        }
        return $this->request($this->context, 'GET', '/1/logs?offset=' . $offset . '&length=' . $length . '&type=' . $type, null, null, $this->context->writeHostsArray, $this->context->connectTimeout, $this->context->readTimeout);
    }