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
  • 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 events
  • Data Collection
  • Application info
  • Application lifecycle
  • 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
  • Logs
  • Queries
  • Redis commands
  • Requests
  • Routing
  • Server info
  • Solutions
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Flare Client PHP V1

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

Sending a log can be done as such:

$flare->reportMessage('This is a Flare log message', 'info');

There are several log levels you can use, which are the same as the ones defined in PSR-3:

Sending stack traces with your logs

By default, we do not send stack traces alongside your log messages, this because it requires us to do a backtrace on every log call, which can be quite expensive.

If you want to enable sending stack traces, you can do so by changing your config like this:

$config->includeStackTraceWithMessages()
Reporting errors Introduction
  • On this page
  • Activating/Deactivating log reporting
  • Sending stack traces with your logs

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