我正在使用 https://pub.dartlang.org/packages/logging,但是它没有在我的日志中显示任何内容。这是我的代码:
class Test {
final Logger log = new Logger('testLogger');
Future<String> join() async {
try {
return await func();
} on Exception catch (e) {
log.severe('access denied!');
return null;
}
}
debugPrint()
而不是print()
- 我已更新我的答案。 - Günter Zöchbauer