logger top-level property

Logger logger
getter/setter pair

Logger for use across entire library

Implementation

Logger logger = Logger('quantity core')
  ..onRecord.listen((LogRecord record) {
    // ignore: avoid_print
    print('${record.level}: ${record.message}');
    // ignore: avoid_print
    if (record.error != null) print('   ERROR:  ${record.error}');
    // ignore: avoid_print
    if (record.stackTrace != null) print(record.stackTrace);
  });