Logs · Getting started
Logs
Your Laravel app's log lines go to one place, scrubbed of personal data before they leave your server. Search them by text, level, channel or time, watch them live, and read every line of one request together.
Logs is for teams that run Laravel apps on servers of their own and want to read every server's log in one place, without logging in to each machine. Your app keeps logging as it does now, with Log::info() and Log::error(); one more channel in its log stack sends the lines.
How it works
- The SDK,
mybeast/logs-laravel, adds a log channel calledmybeast. You put it in your app's log stack beside the channels you have. - Each line is scrubbed and written to a spool, a file on your server. Nothing goes over the network while a request is running.
- From the spool, lines go to Logs right after each response and each queued job, and every 10 seconds from Laravel's scheduler. While Logs can't be reached, they wait in the spool and go in order later.
- Logs scrubs each line again, keeps it in its project and environment for as many days as you choose, and shows it on your project's pages within seconds.
| Where | What |
|---|---|
| Your app | The SDK, four lines in .env, and the spool in storage/app/private/mybeast-logs. |
| Your server's scheduler | mybeast:logs-ship, which the SDK adds to it, sending what waits. |
Logs, at services.my-beast.com | Your project's pages: Overview (what went wrong in the last 24 hours, and the setup guide until the first line arrives), Search, Live, a page for each line and each request, and Settings for how long lines are kept and the project's keys. |
What you need
- A Laravel 12 or 13 app on PHP 8.2 or later.
- A My Beast project with Logs. Packages and prices are on Logs' page.
- A server secret for Logs,
sk_…. The quickstart says where it is. - Laravel's scheduler running on the server:
schedule:runfrom cron, orschedule:work. - A folder the app can write to for the spool. The default is in its own storage.
An app that isn't Laravel can send its lines to the API with the same kind of secret. There is no SDK for other languages yet.