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

Side by Side Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 854183003: Console was removed from dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 driver; 5 library driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:analysis_server/plugin/plugin.dart'; 10 import 'package:analysis_server/plugin/plugin.dart';
(...skipping 21 matching lines...) Expand all
32 * "console" - log to the console; 32 * "console" - log to the console;
33 * "file:/some/file/name" - log to the file, overwritten on start. 33 * "file:/some/file/name" - log to the file, overwritten on start.
34 */ 34 */
35 void _initIncrementalLogger(String spec) { 35 void _initIncrementalLogger(String spec) {
36 logger = NULL_LOGGER; 36 logger = NULL_LOGGER;
37 if (spec == null) { 37 if (spec == null) {
38 return; 38 return;
39 } 39 }
40 // create logger 40 // create logger
41 if (spec == 'console') { 41 if (spec == 'console') {
42 logger = new StringSinkLogger(console.log); 42 logger = new StringSinkLogger(stdout);
43 } 43 }
44 if (spec.startsWith('file:')) { 44 if (spec.startsWith('file:')) {
45 String fileName = spec.substring('file:'.length); 45 String fileName = spec.substring('file:'.length);
46 File file = new File(fileName); 46 File file = new File(fileName);
47 IOSink sink = file.openWrite(); 47 IOSink sink = file.openWrite();
48 logger = new StringSinkLogger(sink); 48 logger = new StringSinkLogger(sink);
49 } 49 }
50 } 50 }
51 51
52 52
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 /** 323 /**
324 * Print information about how to use the server. 324 * Print information about how to use the server.
325 */ 325 */
326 void _printUsage(ArgParser parser) { 326 void _printUsage(ArgParser parser) {
327 print('Usage: $BINARY_NAME [flags]'); 327 print('Usage: $BINARY_NAME [flags]');
328 print(''); 328 print('');
329 print('Supported flags are:'); 329 print('Supported flags are:');
330 print(parser.usage); 330 print(parser.usage);
331 } 331 }
332 } 332 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698