Added comments

This commit is contained in:
thomashii 2021-07-18 14:02:25 +08:00
parent 82a8c9caed
commit 50bc5d2c51
2 changed files with 6 additions and 2 deletions

View file

@ -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)

View file

@ -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;