mtrust_better_log 1.0.0 mtrust_better_log: ^1.0.0 copied to clipboard
A library to enable logging in stacked apps
Stacked Log #
A library to enable logging in stacked apps
Usage #
final logger = BetterLog.instance;
final loggerInstance = logger.get('Test');
loggerInstance
..d('Debug')
..i('Info')
..e('Error')
..w('Warn')
..wtf('WTF');
// Listen to logs
BetterLog.instance.logMessagesStream.listen((event) {
print(event);
});
// Acces all logs
BetterLog.instance.logMessages;
Running Tests 🧪 #
To run all unit tests:
dart pub global activate coverage 1.2.0
dart test --coverage=coverage
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info
To view the generated coverage report you can use lcov.
# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
open coverage/index.html