Skip to content

Commit 5c5cb57

Browse files
authored
Merge pull request #44 from yosemiteyss/master
fix key not shown for multiline value (#7)
2 parents f1ab4e4 + 7a047c0 commit 5c5cb57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/pretty_dio_logger.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ class PrettyDioLogger extends Interceptor {
236236
if (msg.length + indent.length > linWidth) {
237237
final lines = (msg.length / linWidth).ceil();
238238
for (var i = 0; i < lines; ++i) {
239+
final multilineKey = i == 0 ? "$key:" : "";
239240
logPrint(
240-
'║${_indent(tabs)} ${msg.substring(i * linWidth, math.min<int>(i * linWidth + linWidth, msg.length))}');
241+
'║${_indent(tabs)} $multilineKey ${msg.substring(i * linWidth, math.min<int>(i * linWidth + linWidth, msg.length))}');
241242
}
242243
} else {
243244
logPrint('║${_indent(tabs)} $key: $msg${!isLast ? ',' : ''}');

0 commit comments

Comments
 (0)