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

Side by Side Diff: lib/src/options.dart

Issue 1126243004: Summarize only per logging level (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « lib/devc.dart ('k') | lib/src/report.dart » ('j') | 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 /// Set of flags and options passed to the compiler 5 /// Set of flags and options passed to the compiler
6 library dev_compiler.src.options; 6 library dev_compiler.src.options;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 253
254 /// Parses options from the command-line 254 /// Parses options from the command-line
255 CompilerOptions parseOptions(List<String> argv) { 255 CompilerOptions parseOptions(List<String> argv) {
256 ArgResults args = argParser.parse(argv); 256 ArgResults args = argParser.parse(argv);
257 var serverMode = args['server']; 257 var serverMode = args['server'];
258 var enableHashing = args['hashing']; 258 var enableHashing = args['hashing'];
259 if (enableHashing == null) { 259 if (enableHashing == null) {
260 enableHashing = serverMode; 260 enableHashing = serverMode;
261 } 261 }
262 var logLevel = serverMode ? Level.ALL : Level.SEVERE; 262 var logLevel = serverMode ? Level.WARNING : Level.SEVERE;
263 var levelName = args['log']; 263 var levelName = args['log'];
264 if (levelName != null) { 264 if (levelName != null) {
265 levelName = levelName.toUpperCase(); 265 levelName = levelName.toUpperCase();
266 logLevel = Level.LEVELS.firstWhere((l) => l.name == levelName, 266 logLevel = Level.LEVELS.firstWhere((l) => l.name == levelName,
267 orElse: () => logLevel); 267 orElse: () => logLevel);
268 } 268 }
269 var useColors = stdioType(stdout) == StdioType.TERMINAL; 269 var useColors = stdioType(stdout) == StdioType.TERMINAL;
270 var sdkPath = args['dart-sdk']; 270 var sdkPath = args['dart-sdk'];
271 if (sdkPath == null && !args['mock-sdk']) { 271 if (sdkPath == null && !args['mock-sdk']) {
272 sdkPath = getSdkDir(argv).path; 272 sdkPath = getSdkDir(argv).path;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // The pub-cache directory is two levels up, but we verify that the layout 445 // The pub-cache directory is two levels up, but we verify that the layout
446 // looks correct. 446 // looks correct.
447 if (path.basename(dir) != 'dev_compiler') return null; 447 if (path.basename(dir) != 'dev_compiler') return null;
448 dir = path.dirname(dir); 448 dir = path.dirname(dir);
449 if (path.basename(dir) != 'global_packages') return null; 449 if (path.basename(dir) != 'global_packages') return null;
450 dir = path.dirname(dir); 450 dir = path.dirname(dir);
451 return path.join(dir, cacheDir, 'lib', 'runtime'); 451 return path.join(dir, cacheDir, 'lib', 'runtime');
452 } 452 }
453 return null; 453 return null;
454 } 454 }
OLDNEW
« no previous file with comments | « lib/devc.dart ('k') | lib/src/report.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698