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 Svelte Svelte Protocol Protocol
  • General
  • Installation
  • Resolving bundled code
  • API reference
  • Errors
  • Reporting errors
  • Client hooks
  • Logs
  • Introduction
  • Levels
  • Attributes
  • Data Collection
  • Adding custom context
  • Adding glows

Levels

Flare uses the standard syslog severity levels for logs. Each level has its own method on flare.logger. The following levels are available, from most to least severe:

Method Description
flare.logger.emergency(message, attributes?) System is unusable
flare.logger.alert(message, attributes?) Action must be taken immediately
flare.logger.critical(message, attributes?) Critical conditions
flare.logger.error(message, attributes?) Error conditions
flare.logger.warning(message, attributes?) Warning conditions
flare.logger.notice(message, attributes?) Normal but significant condition
flare.logger.info(message, attributes?) Informational messages
flare.logger.debug(message, attributes?) Debug-level messages
flare.logger.debug('Cache miss', { key: 'user:42' });
flare.logger.warning('Retrying request', { attempt: 2 });
flare.logger.critical('Payment provider unreachable');

Setting a minimum level

By default, every level is sent to Flare. Set minimumLogLevel to drop anything below a given severity:

flare.configure({
    enableLogs: true,
    minimumLogLevel: 'warning',
});

With the example above, only logs at warning or above (warning, error, critical, alert, emergency) are recorded. Calls to flare.logger.info() and flare.logger.debug() become no-ops.

Logs filtered out by minimumLogLevel are never buffered, so they cost nothing beyond the method call.

Introduction Attributes
  • On this page
  • Setting a minimum level

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