logger 0.8.1 copy "logger: ^0.8.1" to clipboard
logger: ^0.8.1 copied to clipboard

outdated

Small, easy to use and extensible logger which prints beautiful logs.

example/lib/main.dart

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"});
}
3269
likes
0
pub points
100%
popularity

Publisher

verified publishersourcehorizon.org

Small, easy to use and extensible logger which prints beautiful logs.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on logger