Skip to content
pubscout

mason_logger

0.3.6, released 2 months ago by brickhub.dev

A lightweight CLI logger with prompts, progress, and custom styling.

$ flutter pub add mason_logger
Source repository

What it does

Provides a Logger class for stdout logging, user prompts, progress bars, and hyperlink support. It is used by the Mason CLI and can be used in any Dart console app.

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

Use it when

  • Building command‑line tools that need user interaction
  • Adding structured logs to a Dart CLI
  • Creating progress indicators for async tasks

Skip it when

  • Developing Flutter UI widgets
  • Needing a logging framework for mobile or web apps

Strengths

  • Simple API, no build_runner or codegen
  • Customizable styles and themes
  • Built‑in prompt, choice, and progress utilities

Weaknesses

  • Only works in terminal environments
  • No async stream or file logging support
  • Limited to Dart CLI, not Flutter

Setup

Kind
FFI (native library)
Effort
Low
Code generation
No
Direct dependencies
3

Add dependency to pubspec and import package:mason_logger/mason_logger.dart

import 'package:mason_logger/mason_logger.dart';

final logger = Logger();
logger.info('Hello, world!');
final choice = logger.chooseOne('Pick a color', choices: ['red','green']);
print('You chose $choice');

Alternatives

Packages that do the same job and could replace mason_logger.

  • logger

    Standard Dart logger with similar API but without prompt utilities

Works with

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