OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library csslib.src.messages; | 5 library csslib.src.messages; |
6 | 6 |
7 import 'package:logging/logging.dart' show Level; | 7 import 'package:logging/logging.dart' show Level; |
8 import 'package:source_span/source_span.dart'; | 8 import 'package:source_span/source_span.dart'; |
9 | 9 |
10 import 'options.dart'; | 10 import 'options.dart'; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 | 117 |
118 messages.add(msg); | 118 messages.add(msg); |
119 | 119 |
120 if (options.verbose) printHandler(msg); | 120 if (options.verbose) printHandler(msg); |
121 } | 121 } |
122 | 122 |
123 /** Merge [newMessages] to this message lsit. */ | 123 /** Merge [newMessages] to this message lsit. */ |
124 void mergeMessages(Messages newMessages) { | 124 void mergeMessages(Messages newMessages) { |
125 messages.addAll(newMessages.messages); | 125 messages.addAll(newMessages.messages); |
126 newMessages.messages | 126 newMessages.messages |
127 .where( | 127 .where((message) => message.level == Level.SEVERE || options.verbose) |
128 (message) => message.level.value == Level.SEVERE || options.verbose) | |
129 .forEach((message) { | 128 .forEach((message) { |
Bob Nystrom
2015/04/03 16:15:24
forEach(printHandler);
kevmoo
2015/04/03 16:31:25
Done.
| |
130 printHandler(message); | 129 printHandler(message); |
131 }); | 130 }); |
132 } | 131 } |
133 } | 132 } |
OLD | NEW |