sentry_logging
10.6.0, released today by sentry.io
Adds Sentry logging integration for the Dart logging package
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.
83Compare - talker
Advanced error handler and logger package for Flutter and Dart apps.
94Compare - talker_logger
Lightweight, customizable logger with filters, formatters and log levels
90Compare - talker_bloc_logger
Lightweight and customizable logger for BLoC and Cubit built on Talker.
89Compare
Works with
Packages commonly used together with sentry_logging: ones it builds on, ones built on it, and its own family.
- loggingsentry_logging depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- sentrysentry_logging depends on itCrash reporting and error tracking library for Dart and Flutter applications.
- sentry_flutterSame familySentry SDK for Flutter to capture errors, crashes and performance data across platforms.
- sentry_dart_pluginSame familyUploads debug symbols and source maps to Sentry for server-side symbolication.
- sentry_dioSame familyAdds Sentry performance tracing and error capture to Dio HTTP requests.
- sentry_linkSame familyAutomatic capture of exceptions and GraphQL errors for the gql ecosystem like graphql and ferry.
- sentry_driftSame familyPerformance tracing integration for the drift SQL package using Sentry.