Flare by Spatie
  • Features
  • Pricing
  • Docs
  • Blog
  • LOG IN
  • START TRACKING
  • Home
  • Features
  • Pricing
  • Docs
  • Blog
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript
  • General
  • Introduction
  • Installation
  • Censoring collected data
  • Ignoring collected data
  • Laravel Octane
  • Errors
  • Adding custom context
  • Customising error grouping
  • Handling errors
  • Linking to errors
  • Reporting errors
  • Sending logs to Flare
  • Performance
  • Introduction
  • Sampling
  • Limits
  • Modify spans and span events
  • Data Collection
  • Application info
  • Cache events
  • Console commands
  • Customise error report
  • Database transactions
  • Dumps
  • Errors when tracing
  • Exception context
  • External http requests
  • Filesystem operations
  • Git information
  • Glows
  • Identifying users
  • Jobs and queues
  • Laravel context
  • Livewire
  • Logs
  • Queries
  • Redis commands
  • Requests
  • Server info
  • Solutions
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Laravel Flare V1
  • Ignition

Sending logs to Flare

In addition to handling your application errors, you may also want to send specific error messages to Flare.

These error messages are not necessarily errors but log statements that exceed a specified threshold—think of critical logs that your application sends and that you want to be notified about.

Activating/Deactivating log reporting

In your flare.php config file, you can enable or disable log reporting. The send_logs_as_events key determines whether Flare should receive your error logs automatically.

Controlling the minimum log level to report

By default, we only collect logs that are at least of the type "Error" or above (Emergency, Critical). That means we do not receive simple info logs you perform in your application.

You can modify the minimum report log level by specifying it by adding or modifying the level key in your logging channel configuration.

For example, this would restrict logs to being sent to Flare only when they are at the "critical" level.

// in your config/logging.php
'flare' => [
    'driver' => 'flare',
    'level' => 'critical',
],

This would mean that the following log calls would be sent to Flare:

Log::critical('Something went wrong');
Log::alert('Something went wrong');
Log::emergency('Something went wrong');

But these log calls would not be sent to Flare:

Log::debug('Something went wrong');
Log::info('Something went wrong');
Log::notice('Something went wrong');
Log::warning('Something went wrong');
Log::error('Something went wrong');
Reporting errors Introduction
  • On this page
  • Activating/Deactivating log reporting
  • Controlling the minimum log level to report

Monitor your web apps and sites from errors to slowdowns with Flare, the easiest application monitoring platform for Laravel, PHP & Javascript.

  • Platform
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Support
  • Resources
  • Blog
  • Changelog
  • Documentation
  • Affiliate program
  • Service status
  • Terms of use
  • DPA
  • Privacy & Cookie Policy
Flare