logging 

Send to Kindle
home » snippets » dart » logging



Snippets

Adding a sample logger to your app

Ref: route/example/full/index.dart at experimental_hierarchical

import 'package:logging/logging.dart';

void main() {
  new Logger('')
      ..level = Level.FINEST
      ..onRecord.listen((r) =>
          print('${new DateTime.now()}: [${r.level}] ${r.message}'));
  // …
}