mason_logger 0.1.0-dev.2 mason_logger: ^0.1.0-dev.2 copied to clipboard
A reusable Dart logger used by the [Mason CLI](https://github.com/felangel/mason).
import 'package:mason_logger/mason_logger.dart';
Future<void> main() async {
final logger = Logger()
..info('info')
..alert('alert')
..err('error')
..success('success')
..warn('warning')
..detail('detail');
final favoriteAnimal = logger.prompt('What is your favorite animal?\n');
final done = logger.progress('Displaying progress');
await Future<void>.delayed(const Duration(seconds: 1));
done('Done displaying progress!');
logger.info('Your favorite animal is $favoriteAnimal!');
}