Skip to content
pubscout

sentry_logging

10.6.0, released today by sentry.io

Adds Sentry logging integration for the Dart logging package

WASM-readyRock solid
$ flutter pub add sentry_logging
Source repository

What it does

Integrates the Dart logging package with Sentry, sending log records as events. It registers a LoggingIntegration with the Sentry SDK to capture logs automatically.

AI-written summary of version 10.3.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You use the Dart logging package and want logs sent to Sentry
  • You need to monitor application logs in Sentry for debugging

Skip it when

  • You are not using the logging package or already have another logging integration

Strengths

  • Simple one-line integration
  • Captures all log levels
  • No build_runner or codegen required

Weaknesses

  • Only works with the logging package
  • No support for other logging frameworks

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

Add the package to pubspec, import, and call options.addIntegration(LoggingIntegration());

import 'package:sentry/sentry.dart';
import 'package:sentry_logging/sentry_logging.dart';

Future<void> main() async {
  await Sentry.init((options) {
    options.dsn = 'https://example@sentry.io/example';
    options.addIntegration(LoggingIntegration());
  }, appRunner: () => runApp(MyApp()));
}

Alternatives

Packages that do the same job and could replace sentry_logging.

  • logger

    An extensible logger for printing formatted logs with levels, custom filters, and printers.

  • talker

    Advanced error handler and logger package for Flutter and Dart apps.

  • talker_logger

    Lightweight, customizable logger with filters, formatters and log levels

  • talker_bloc_logger

    Lightweight and customizable logger for BLoC and Cubit built on Talker.

Works with

Packages commonly used together with sentry_logging: ones it builds on, ones built on it, and its own family.