File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class PrettyPrinter extends LogPrinter {
79
79
/// for example to prevent boxing of [Level.verbose] and [Level.info] use excludeBox:{Level.verbose:true, Level.info:true}
80
80
final Map <Level , bool > excludeBox;
81
81
82
- /// To make the default for every level to prevent boxing entirely set [noBoxing ] to true
82
+ /// To make the default for every level to prevent boxing entirely set [noBoxingByDefault ] to true
83
83
/// (boxing can still be turned on for some levels by using something like excludeBox:{Level.error:false} )
84
84
final bool noBoxingByDefault;
85
85
@@ -115,11 +115,8 @@ class PrettyPrinter extends LogPrinter {
115
115
116
116
// Translate excludeBox map (constant if default) to includeBox map with all Level enum possibilities
117
117
includeBox = {};
118
- for (var levelEnum in Level .values) {
119
- includeBox[levelEnum] = excludeBox.containsKey (levelEnum)
120
- ? ! excludeBox[levelEnum]!
121
- : ! noBoxingByDefault;
122
- }
118
+ Level .values.forEach ((l) => includeBox[l] = ! noBoxingByDefault);
119
+ excludeBox.forEach ((k, v) => includeBox[k] = ! v);
123
120
}
124
121
125
122
@override
You can’t perform that action at this time.
0 commit comments