Flare by Spatie
    • Error Tracking
    • Performance Monitoring
    • Logs Coming soon
  • Pricing
  • Docs
  • Insights
  • Changelog
  • Back to Flare ⌘↵ Shortcut: Command or Control Enter
  • Sign in
  • Try Flare for free
  • Error Tracking
  • Performance Monitoring
  • Logs Coming soon
  • Pricing
  • Docs
  • Insights
  • Changelog
    • Back to Flare ⌘↵ Shortcut: Command or Control Enter
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript React React Vue Vue Protocol Protocol
  • General
  • Installation
  • Censoring collected data
  • Ignoring collected data
  • Flare daemon
  • Laravel Octane
  • Laravel Vapor
  • Errors
  • Adding custom context
  • Customise error report
  • Customising error grouping
  • Handling errors
  • Linking to errors
  • Reporting errors
  • Logs
  • Introduction
  • Levels
  • With errors
  • Performance
  • Introduction
  • Sampling
  • Limits
  • Modify spans and span events
  • Data Collection
  • Application info
  • Cache events
  • Console commands
  • Database transactions
  • Dumps
  • Errors when tracing
  • Exception context
  • External http requests
  • Filesystem operations
  • Git information
  • Glows
  • Identifying users
  • Jobs and queues
  • Laravel context
  • Livewire
  • Queries
  • Redis commands
  • Requests
  • Server info
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Laravel Flare V2
  • Laravel Flare V1
  • Ignition

Levels

Flare uses Monolog log levels throughout its logging system. The following levels are available, from most to least severe:

Level Description
Level::Emergency System is unusable
Level::Alert Action must be taken immediately
Level::Critical Critical conditions
Level::Error Error conditions
Level::Warning Warning conditions
Level::Notice Normal but significant condition
Level::Info Informational messages
Level::Debug Debug-level messages

When you set a minimal log level, only logs at that level or above (more severe) will be collected.

Where log levels can be configured

There are two places where you can configure log levels, each controlling a different part of the logging system.

Standalone log shipping

When enabling log collection in your config/flare.php file, you can set a minimal level for logs that are shipped to Flare as standalone entities:

// config/flare.php
'log' => true,

'minimal_log_level' => \Monolog\Level::Warning,

When set, only logs at Warning or above will be sent to Flare. When null (the default), all log levels are sent.

This is the primary level gate. If a log doesn't pass this threshold, it won't be recorded at all — meaning it also won't be available for inclusion with error reports.

Logs with errors

When an error occurs, recent log entries are included alongside the error report. You can set a separate minimal level for these logs in the collects config:

use Spatie\FlareClient\Enums\CollectType;

'collects' => FlareConfig::defaultCollects(
    extra: [
        CollectType::LogsWithErrors->value => [
            'minimal_level' => \Monolog\Level::Warning,
        ],
    ]
),

The default level is Level::Info. This level only filters logs that were already recorded by the logger — it cannot include logs that were filtered out by the minimal_log_level setting.

How the levels interact

The minimal_log_level setting is the primary gate. It determines which logs are recorded at all. The logs-with-errors level is a secondary filter that only applies when attaching logs to error reports.

For example, if you set minimal_log_level to Level::Warning and the logs-with-errors level to Level::Info, the logs-with-errors level has no effect — Info logs were never recorded in the first place.

As a rule of thumb: the logs-with-errors minimal level should always be equal to or higher than the minimal_log_level setting.

Introduction With errors
  • On this page
  • Where log levels can be configured
  • How the levels interact

Catch errors and fix slowdowns with Flare, the full-stack application monitoring platform for Laravel, PHP & JavaScript.

  • Platform
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Support
  • Resources
  • Insights
  • Newsletter
  • Changelog
  • Documentation
  • Affiliate program
  • uptime status badge Service status
  • Terms of use
  • DPA
  • Privacy & cookie Policy
Made in by
Flare