platform/example/http2/pretty_logging.dart

10 lines
297 B
Dart
Raw Normal View History

2018-11-08 04:11:10 +00:00
import 'package:logging/logging.dart';
/// Prints the contents of a [LogRecord] with pretty colors.
void prettyLog(LogRecord record) {
print(record.toString());
if (record.error != null) print(record.error.toString());
if (record.stackTrace != null) print(record.stackTrace.toString());
}