platform/example/http2/pretty_logging.dart
2018-11-07 23:11:10 -05:00

9 lines
297 B
Dart

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());
}