simplest_logger 0.0.5
simplest_logger: ^0.0.5 copied to clipboard
A lightweight, opinionated, colorful logging utility for Dart applications. Minimal configuration necessary.
example/simplest_logger_example.dart
import 'package:simplest_logger/simplest_logger.dart';
final class MyClass with SimplestLoggerMixin {
void myMethod() {
logger.info('Hello, world!');
logger.warning('This is a warning');
logger.debug('This is a debug message');
logger.error('This is an error message');
}
}
void main() {
final myClass = MyClass();
myClass.myMethod();
SimplestLogger('Main', LogLevel.all).info('Info message');
SimplestLogger('Main', LogLevel.all).warning('Warning message');
SimplestLogger('Main', LogLevel.all).debug('Debug message');
SimplestLogger('Main', LogLevel.all).error('Error message');
}