Skip to content
pubscout

logger

2.8.0, released 2 months ago by sourcehorizon.org

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

$ flutter pub add logger
Source repository

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.

Works with

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