Logs · Getting started
Quickstart
From a new project to your first line in Logs in six steps. You need a Laravel 12 or 13 app on PHP 8.2 or later, and a terminal where it runs.
1. Choose a plan
Pick Logs and a package on Logs' page, name your project and pay. The project is made at id.my-beast.com and reaches Logs with its environments.
Open the project in Logs, at services.my-beast.com/<workspace>/<project>/logs. Until the first line arrives, its Overview is the setup guide: the same steps as here, each with where your project stands in it.
2. Add the SDK
In your app's folder:
composer require mybeast/logs-laravelLaravel finds the package by itself: there is no service provider to register.
3. Set the app's .env
LOG_STACK=single,mybeast
MYBEAST_LOGS_URL=https://services.my-beast.com/logs
MYBEAST_LOGS_SECRET=sk_…
MYBEAST_LOGS_ENVIRONMENT=productionLOG_STACKlists the channels of your app's log. Keep your own (single,daily, …) and addmybeast. It counts whileLOG_CHANNELisstack, which is Laravel's default.MYBEAST_LOGS_SECRETis the server secret. When id made it with the project, Secrets keeps it and the address as these lines, values filled in, in each environment: an app that takes its.envfrom Secrets has them already. Otherwise make one in the project's Settings, under Logs keys, with New key. It is shown once, when it is made.MYBEAST_LOGS_ENVIRONMENTnames where this copy of the app runs: one of the project's environments, which the setup guide lists. Each environment keeps its lines on its own. Left out, it isAPP_ENV.
Keep the secret on the server
.env or Secrets, never in your repository.If your app caches its config (php artisan config:cache), run that again after changing .env.
4. Check that Logs hears it
On the app's server, write one line and send it at once instead of at the scheduler's next round:
php artisan tinker --execute="Log::info('Hello, Logs')"
php artisan mybeast:logs-shipThe second command says how many lines went, or why the rest waits: a 401 is a secret Logs doesn't know. The setup guide asks every few seconds and becomes the project's dashboard by itself the moment the first line arrives.
5. Keep the scheduler running
Lines go right after each response and each queued job. The SDK also puts mybeast:logs-ship on Laravel's scheduler, every 10 seconds, so that whatever those left behind goes too. On a server, run the scheduler from cron:
* * * * * cd /path/to/your/app && php artisan schedule:run >> /dev/null 2>&1On your own machine, php artisan schedule:work does the same in a terminal. To see what waits, and why, run php artisan mybeast:logs-status.
6. Search and watch
Open Search in your project's Logs: the line from step 4 is there, in the environment you named. Type a word, choose a level or a channel, or pick a time. Live shows new lines as they arrive, with the same filters.
Next steps
- Search your logs: every filter, and how to share what you found.
- Read one request's lines: every line of a request, and of the jobs it queued.
- Data and privacy: what is taken out of a line, and how to add rules of your own.
- Laravel SDK: channels of their own, every config key and command.