PHP Client for Cloudflare API
Workers

Logs

Logs endpoint reference.

List

Get list of tails currently deployed on a Worker.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
scriptNamestringYesName of the script, used in URLs and route configuration.
php
$response = $client->workers()->logs()->list('ACCOUNT_ID', 'SCRIPT_NAME');
View this operation on the Cloudflare API Reference

Start

Starts a tail that receives logs and exception from a Worker.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
scriptNamestringYesName of the script, used in URLs and route configuration.
php
$response = $client->workers()->logs()->start('ACCOUNT_ID', 'SCRIPT_NAME');
View this operation on the Cloudflare API Reference

Delete

Deletes a tail from a Worker.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
scriptNamestringYesName of the script, used in URLs and route configuration.
idstringYesIdentifier for the tail.
php
$response = $client->workers()->logs()->delete('ACCOUNT_ID', 'SCRIPT_NAME', 'ID');
View this operation on the Cloudflare API Reference
Copyright © 2026