logger
2.8.0, released 2 months ago by sourcehorizon.org
An extensible logger for printing formatted logs with levels, custom filters, and printers.
What it does
Provides a Logger instance that prints formatted logs with configurable log levels, filters, printers, and outputs. Supports custom options such as pretty-printing with colors, emojis, method counts, and timestamps.
AI-written summary of version 2.8.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need detailed and formatted console logs during development
- You want to filter logs based on severity or application state
- You require custom outputs like file logging or streams alongside console output
Skip it when
- You need a full production crash-reporting and remote analytics solution
- You want zero-dependency lightweight logging without formatting overhead
Strengths
- Extensible architecture with custom filters, printers, and outputs
- Pretty printing with colors, emojis, and stack traces out of the box
- Supports multiple log levels including trace, debug, info, warning, error, and fatal
Weaknesses
- Requires manual setup and handling if you want persistent file logs in production
- ANSI color escape sequences may have issues on certain macOS environments
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
var logger = Logger();
logger.d("Logger is working!");Alternatives
Packages that do the same job and could replace logger.
- talker_logger
Alternative advanced logger with customizable formatters and settings.
90Compare - mason_logger
Another logging utility focusing on CLI output styling.
90Compare
Works with
Packages commonly used together with logger: ones it builds on, ones built on it, and its own family.
- clocklogger depends on itA fakeable wrapper for dart:core clock APIs.
- flutter_webrtcBuilt on loggerWebRTC plugin for real-time audio, video and data communication.
- http_mock_adapterBuilt on loggerA simple to use mocking package for Dio intended to be used in tests.
- flutter_soundBuilt on loggerPlay and record audio on Flutter across mobile, web and desktop.
- renameBuilt on loggerCLI tool to rename Flutter app name and bundle identifier across platforms.
- pubspec_dependency_sorterBuilt on loggerSorts pubspec.yaml dependencies alphabetically
- segment_analyticsBuilt on loggerAdd Segment analytics to your Flutter app to track events, user screens, and identities.
- squadronBuilt on loggerMultithreading and worker thread pools for Dart and Flutter using Isolates and Web Workers.