logger 0.8.2 logger: ^0.8.2 copied to clipboard
Small, easy to use and extensible logger which prints beautiful logs.
import 'package:logger/logger.dart';
var logger = Logger(
printer: PrettyPrinter(),
);
var loggerNoStack = Logger(
printer: PrettyPrinter(methodCount: 0),
);
void main() {
print(
"Run with either `dart example/lib/main.dart` or `dart --enable-asserts example/lib/main.dart`.");
demo();
}
void demo() {
logger.d("Log message with 2 methods");
loggerNoStack.i("Info message");
loggerNoStack.w("Just a warning!");
logger.e("Error! Something bad happened", "Test Error");
loggerNoStack.v({"key": 5, "value": "something"});
}