Added comments
This commit is contained in:
parent
82a8c9caed
commit
50bc5d2c51
2 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
import 'dart:io';
|
||||
import 'package:args/args.dart';
|
||||
|
||||
/// Options for executing Runner.
|
||||
class RunnerOptions {
|
||||
/// Command line arguements
|
||||
static final ArgParser argParser = ArgParser()
|
||||
..addFlag('help',
|
||||
abbr: 'h', help: 'Print this help information.', negatable: false)
|
||||
|
|
|
@ -54,9 +54,10 @@ _ ___ | /| / / /_/ / _ /___ _ /___
|
|||
|
||||
''';
|
||||
|
||||
/// LogRecord handler
|
||||
static void handleLogRecord(LogRecord? record, RunnerOptions options) {
|
||||
if (options.quiet) return;
|
||||
var code = chooseLogColor(record!.level);
|
||||
if (options.quiet || record == null) return;
|
||||
var code = chooseLogColor(record.level);
|
||||
|
||||
if (record.error == null) print(code.wrap(record.toString()));
|
||||
|
||||
|
@ -214,6 +215,7 @@ _ ___ | /| / / /_/ / _ /___ _ /___
|
|||
}
|
||||
}
|
||||
|
||||
/// Run with main isolate
|
||||
static void isolateMain(_RunnerArgsWithId argsWithId) {
|
||||
var args = argsWithId.args;
|
||||
hierarchicalLoggingEnabled = true;
|
||||
|
|
Loading…
Reference in a new issue