mason_logger 0.1.0-dev.3 copy "mason_logger: ^0.1.0-dev.3" to clipboard
mason_logger: ^0.1.0-dev.3 copied to clipboard

outdated

A reusable Dart logger used by the [Mason CLI](https://github.com/felangel/mason).

mason_logger #

build coverage Pub style: very good analysis License: MIT

A reusable logger used by the Mason CLI.

import 'package:mason_logger/mason_logger.dart';

Future<void> main() async {
  // Use the various APIs to log to stdout.
  final logger = Logger()
    ..info('info')
    ..alert('alert')
    ..err('error')
    ..success('success')
    ..warn('warning')
    ..detail('detail');

  // Prompt for user input.
  final favoriteAnimal = logger.prompt('What is your favorite animal?');

  // Show a progress message while performing an asynchronous operation.
  final done = logger.progress('Displaying progress');
  await Future<void>.delayed(const Duration(seconds: 1));

  // Show a completion message when the asynchronous operation has completed.
  done('Done displaying progress!');

  // Use the user provided input.
  logger.info('Your favorite animal is $favoriteAnimal!');
}
36
likes
0
pub points
99%
popularity

Publisher

verified publisherbrickhub.dev

A reusable Dart logger used by the [Mason CLI](https://github.com/felangel/mason).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta, universal_io

More

Packages that depend on mason_logger