Logs · Plans and data
Troubleshooting
Each problem as you meet it, why it happens, and the fix.
Start with the status command
On the app's server, in its folder:
php artisan mybeast:logs-status| Row | What it says |
|---|---|
| On | yes, to the address, or no: no URL or server secret, or switched off. |
| Environment | The environment every line is sent with. |
| Spool | The folder lines wait in. |
| Waiting | How much waits to be sent, and in how many files. |
| Full | no, or since when the spool is full and new lines aren't kept. |
| Last try | When this server last tried to send, or never. |
| Failing | no, or since when sending fails, with the service's answer. |
Then send what waits, and read the answer: php artisan mybeast:logs-ship. The SDK's own warnings are in your app's other log channels, such as storage/logs/laravel.log, in lines that start with My Beast logs:.
Nothing arrives
Onsaysno.MYBEAST_LOGS_URLorMYBEAST_LOGS_SECRETis missing or malformed, orMYBEAST_LOGS_ENABLEDisfalse. If your app caches its config, runphp artisan config:cacheagain after changing.env.Waitingstays empty. The channel gets no lines. Check thatLOG_STACKhasmybeast, and thatLOG_CHANNELisstack. AMYBEAST_LOGS_LEVELabove the line's level keeps it out.- Lines wait and don't go.
Failinggives the service's answer; the sections below explain each. With no answer at all, the server can't reachservices.my-beast.com. - Lines went, but Search shows none. They are in another environment: pick it in the switch above the search, or see Lines are in the wrong environment.
The service answered 401
Logs doesn't know the secret: it was revoked, mistyped, or is another product's, as a key opens one product only. The lines wait in the spool. Make a new key in the project's Settings, under Logs keys, put it in MYBEAST_LOGS_SECRET, and the next round sends them.
The service answered 402
The workspace's subscription has ended, and Logs takes no new lines. They wait in the spool, up to its size. Renew the subscription at id and they go on the next round. See When a subscription ends.
Lines arrive late
- The scheduler isn't running. Lines still go after each response and job, but what those leave behind waits. Run
schedule:runfrom cron, orschedule:work. The quickstart has the cron line. MYBEAST_LOGS_SHIP_AFTER_RESPONSEisfalse. Every send is left to the scheduler, everyMYBEAST_LOGS_SHIP_EVERYseconds.- Sending was failing. While it fails, only the scheduler tries, so no request waits on a service that is away. When it works again, the spool catches up oldest first.
The spool is full
Full says since when. The spool grows while lines can't be sent, up to MYBEAST_LOGS_SPOOL_MAX_MB; past that, new lines aren't kept. Fix what Failing says, or give the spool more room. Once there is room, a line in Logs says from when to when lines weren't kept. A spool folder the app can't write to keeps nothing either: check its permissions.
Lines are refused
The service takes a batch but refuses some of its lines, and the SDK warns in your app's log with each line's reason. Refused lines aren't sent again.
at: older than the … days this environment keeps lines: the line waited longer than its environment keeps lines, or the server's clock is behind.monthly-limit: the project's lines for this month are used up. The SDK says so once a month instead of for each line. See Lines a month.
A batch is kept in failed/
When the service refuses a batch whole as unreadable, the SDK moves it to failed/ in the spool and warns, so it doesn't hold up the lines after it. The SDK always sends what the service reads, so tell us if it happens: write to us with the warning.
Lines are in the wrong environment
MYBEAST_LOGS_ENVIRONMENTnames the environment. Left out, it isAPP_ENV, which islocalin a copy of Laravel's.env.example.- A name that isn't one of the project's environments still gets its lines, marked “Not one of the project's environments” in Settings. Use one of the names the setup guide lists.
- The release is the git commit, read from
.git. A deploy without.gitsends none: setMYBEAST_LOGS_RELEASEin the deploy.
Personal data shows in a line
The built-in patterns don't know your app's data. Add a rule for it, as Rules of your own shows, and new lines go without it. Lines already kept go as their environment's days pass, or sooner as Erasing a person's data says.
Your tests send lines
Switch the SDK off in phpunit.xml: the channel then takes lines and keeps none.
<env name="MYBEAST_LOGS_ENABLED" value="false"/>