Skip to content

clearing the error logs, not the hits #381

@verstecken

Description

@verstecken

in the Error tab, I click "Log leeren". But it also clears the hits for my routes (are those errors?). I wanna get rid of 500+ crawler entries but keep my hits for the routes I created. But actually maybe thats only nice for my case, using retour to manage QR code scans?

a new function in log.php could be flush404():

	/**
	 * Remove database records and reset index
	 */
	public function flush(): bool
	{
		$table = $this->table()->delete();
		$index = $this->database->sqlite_sequence()->delete([
			'name' => 'records'
		]);
		return $table && $index;
	}

	/**
	 * Remove only 404 failure records (preserve redirect hit statistics)
	 */
	public function flush404(): bool
	{
		return $this->table()->delete('redirect IS NULL AND wasResolved IS NULL');
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions