Skip to content
Docs

Logs

Everything your apps print, and every visit, live in one place. Search the last hour, day or 7 days, download them, or send them to your own log service.

Updated 17 Oct 20263 min read

The project's Logs tab shows, live, every line your apps print and every visit they answer. Use it to answer "why is my app broken?" yourself. Logs are kept for 7 days.

What's in them

  • What your apps print: the web process, workers, scheduled tasks and one-off commands like a migration.

  • Every visit: the method, the path (without the part after ?), the status and the time it took.

  • The web firewall's notes: a visit it would stop, or stopped, with the rule's number. See Protection and speed.

Build logs are on each deployment's page, not here. See Deploying.

Levels

LevelWhich lines
ErrorsA visit answered with a 5xx status, and a printed line that says error, fatal, panic or exception
WarningsA visit answered with a 4xx status, and a printed line that says warn

Choose Errors or Warnings to see only those, or Everything.

Find a line

  1. Open your project, then the Logs tab.

  2. Choose an app, or All apps.

  3. Choose Live, Last hour, Last 24 hours or Last 7 days.

  4. Type in Search the logs.

Pause stops the screen moving while you read; new lines wait, and Resume shows them. Download saves what you see as a text file.

Above the lines, three numbers sum up the project: Requests a minute, Errors in the last hour, and how long the Slowest 5% of visits take.

Example: a failed checkout

A customer tells Asha her checkout showed an error. She opens duka's Logs, chooses web, Errors and Last hour, and searches for checkout:

text
14:02:11  web  POST /checkout  500  1.2 s
14:02:11  web  [error] SQLSTATE[42S22]: Column not found: 'discount_code'

The migration for the new discount column never ran. She ticks Run migrations on each deploy in her app's Laravel card and runs Run migrations once. The next checkout works.

Limits

  • 7 days: older lines are deleted.

  • 50 lines a second an app: beyond that, over 10 seconds, the extra lines are left out and one line says how many. A loop that prints too much can't fill your logs.

  • Visits: the screen shows up to 200 a second for an app. Visits left out still count in the numbers.

Print less in production, and use levels: Laravel's LOG_LEVEL=info variable, for example.

Send logs to your own service

Already use Better Stack, Papertrail, Datadog or your own collector? Send each project's logs there as they happen, to up to 3 places:

  1. Open the project's Settings tab, then Send logs elsewhere.

  2. Choose the Kind:

    • HTTPS: each second's lines arrive in one POST to your https:// address, one JSON object a line, with an optional Secret header, like Authorization: Bearer …, kept encrypted.

    • Syslog (TLS): the host:port of a syslog server that takes TLS.

  3. Type the Address and choose Add.

Lines are sent in order, from where they stopped. If your service fails, we try again, waiting longer each time, and the place shows Failing with its last error. Lines older than 7 days can't be sent any more. Only addresses on the internet are allowed: private and local addresses are refused.

For app code

Write to standard output or standard error, as most frameworks do by default. For Laravel, LOG_CHANNEL=stderr sends its log there instead of a file in storage/logs. For Python, what you print shows at once.