Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: pkg/analyzer/lib/src/services/runtime/log.dart

Issue 681003002: Replace ${name} with $name where possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up also implementation Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// Simple wrapper for [Logger] library. 5 /// Simple wrapper for [Logger] library.
6 library runtime.log; 6 library runtime.log;
7 7
8 import "package:logging/logging.dart"; 8 import "package:logging/logging.dart";
9 9
10 /** Log message at level [Level.FINEST]. */ 10 /** Log message at level [Level.FINEST]. */
(...skipping 23 matching lines...) Expand all
34 /// Specifies that all log records should be logged. 34 /// Specifies that all log records should be logged.
35 void everything() { 35 void everything() {
36 _logger.level = Level.ALL; 36 _logger.level = Level.ALL;
37 } 37 }
38 38
39 /// Sends all log record to the console. 39 /// Sends all log record to the console.
40 void toConsole() { 40 void toConsole() {
41 _logger.onRecord.listen((LogRecord record) { 41 _logger.onRecord.listen((LogRecord record) {
42 String levelString = record.level.toString(); 42 String levelString = record.level.toString();
43 while (levelString.length < 6) levelString += ' '; 43 while (levelString.length < 6) levelString += ' ';
44 print('${record.time}: ${levelString} ${record.message}'); 44 print('${record.time}: $levelString ${record.message}');
45 }); 45 });
46 } 46 }
47 47
48 /// The root [Logger]. 48 /// The root [Logger].
49 final Logger _logger = Logger.root; 49 final Logger _logger = Logger.root;
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/services/runtime/coverage/models.dart ('k') | pkg/analyzer/test/generated/all_the_rest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698