| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 pub.barback.build_environment; | 5 library pub.barback.build_environment; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:barback/barback.dart'; | 10 import 'package:barback/barback.dart'; |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 /// | 430 /// |
| 431 /// Since both [LogEntry] objects and the message itself often redundantly | 431 /// Since both [LogEntry] objects and the message itself often redundantly |
| 432 /// show the same context like the file where an error occurred, this tries | 432 /// show the same context like the file where an error occurred, this tries |
| 433 /// to avoid showing redundant data in the entry. | 433 /// to avoid showing redundant data in the entry. |
| 434 void _log(LogEntry entry) { | 434 void _log(LogEntry entry) { |
| 435 messageMentions(text) => | 435 messageMentions(text) => |
| 436 entry.message.toLowerCase().contains(text.toLowerCase()); | 436 entry.message.toLowerCase().contains(text.toLowerCase()); |
| 437 | 437 |
| 438 messageMentionsAsset(id) => | 438 messageMentionsAsset(id) => |
| 439 messageMentions(id.toString()) || | 439 messageMentions(id.toString()) || |
| 440 messageMentions(path.joinAll(path.url.split(entry.assetId.path))); | 440 messageMentions(path.fromUri(entry.assetId.path)); |
| 441 | 441 |
| 442 var prefixParts = []; | 442 var prefixParts = []; |
| 443 | 443 |
| 444 // Show the level (unless the message mentions it). | 444 // Show the level (unless the message mentions it). |
| 445 if (!messageMentions(entry.level.name)) { | 445 if (!messageMentions(entry.level.name)) { |
| 446 prefixParts.add("${entry.level} from"); | 446 prefixParts.add("${entry.level} from"); |
| 447 } | 447 } |
| 448 | 448 |
| 449 // Show the transformer. | 449 // Show the transformer. |
| 450 prefixParts.add(entry.transform.transformer); | 450 prefixParts.add(entry.transform.transformer); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 String toString() => "polling"; | 522 String toString() => "polling"; |
| 523 } | 523 } |
| 524 | 524 |
| 525 class _NoneWatcherType implements WatcherType { | 525 class _NoneWatcherType implements WatcherType { |
| 526 const _NoneWatcherType(); | 526 const _NoneWatcherType(); |
| 527 | 527 |
| 528 DirectoryWatcher create(String directory) => null; | 528 DirectoryWatcher create(String directory) => null; |
| 529 | 529 |
| 530 String toString() => "none"; | 530 String toString() => "none"; |
| 531 } | 531 } |
| OLD | NEW |