| Index: sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/log.dart b/sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| similarity index 92%
|
| copy from sdk/lib/_internal/pub/lib/src/log.dart
|
| copy to sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| index 0b14ab30eb0b2050557c973e18d2ddb75903856c..ecf67ed2c053d6efaef65453f59b8f001ae70a01 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/log.dart
|
| +++ b/sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| @@ -103,62 +103,62 @@ typedef _LogFn(Entry entry);
|
| class Verbosity {
|
| /// Silence all logging.
|
| static const NONE = const Verbosity._("none", const {
|
| - Level.ERROR: null,
|
| + Level.ERROR: null,
|
| Level.WARNING: null,
|
| Level.MESSAGE: null,
|
| - Level.IO: null,
|
| - Level.SOLVER: null,
|
| - Level.FINE: null
|
| + Level.IO: null,
|
| + Level.SOLVER: null,
|
| + Level.FINE: null
|
| });
|
|
|
| /// Shows only errors and warnings.
|
| static const WARNING = const Verbosity._("warning", const {
|
| - Level.ERROR: _logToStderr,
|
| + Level.ERROR: _logToStderr,
|
| Level.WARNING: _logToStderr,
|
| Level.MESSAGE: null,
|
| - Level.IO: null,
|
| - Level.SOLVER: null,
|
| - Level.FINE: null
|
| + Level.IO: null,
|
| + Level.SOLVER: null,
|
| + Level.FINE: null
|
| });
|
|
|
| /// The default verbosity which shows errors, warnings, and messages.
|
| static const NORMAL = const Verbosity._("normal", const {
|
| - Level.ERROR: _logToStderr,
|
| + Level.ERROR: _logToStderr,
|
| Level.WARNING: _logToStderr,
|
| Level.MESSAGE: _logToStdout,
|
| - Level.IO: null,
|
| - Level.SOLVER: null,
|
| - Level.FINE: null
|
| + Level.IO: null,
|
| + Level.SOLVER: null,
|
| + Level.FINE: null
|
| });
|
|
|
| /// Shows errors, warnings, messages, and IO event logs.
|
| static const IO = const Verbosity._("io", const {
|
| - Level.ERROR: _logToStderrWithLabel,
|
| + Level.ERROR: _logToStderrWithLabel,
|
| Level.WARNING: _logToStderrWithLabel,
|
| Level.MESSAGE: _logToStdoutWithLabel,
|
| - Level.IO: _logToStderrWithLabel,
|
| - Level.SOLVER: null,
|
| - Level.FINE: null
|
| + Level.IO: _logToStderrWithLabel,
|
| + Level.SOLVER: null,
|
| + Level.FINE: null
|
| });
|
|
|
| /// Shows errors, warnings, messages, and version solver logs.
|
| static const SOLVER = const Verbosity._("solver", const {
|
| - Level.ERROR: _logToStderr,
|
| + Level.ERROR: _logToStderr,
|
| Level.WARNING: _logToStderr,
|
| Level.MESSAGE: _logToStdout,
|
| - Level.IO: null,
|
| - Level.SOLVER: _logToStdout,
|
| - Level.FINE: null
|
| + Level.IO: null,
|
| + Level.SOLVER: _logToStdout,
|
| + Level.FINE: null
|
| });
|
|
|
| /// Shows all logs.
|
| static const ALL = const Verbosity._("all", const {
|
| - Level.ERROR: _logToStderrWithLabel,
|
| + Level.ERROR: _logToStderrWithLabel,
|
| Level.WARNING: _logToStderrWithLabel,
|
| Level.MESSAGE: _logToStdoutWithLabel,
|
| - Level.IO: _logToStderrWithLabel,
|
| - Level.SOLVER: _logToStderrWithLabel,
|
| - Level.FINE: _logToStderrWithLabel
|
| + Level.IO: _logToStderrWithLabel,
|
| + Level.SOLVER: _logToStderrWithLabel,
|
| + Level.FINE: _logToStderrWithLabel
|
| });
|
|
|
| const Verbosity._(this.name, this._loggers);
|
| @@ -234,7 +234,8 @@ String format(String string) {
|
|
|
| // [toUpperCase] can corrupt terminal colorings, so fix them up using
|
| // [replaceAllMapped].
|
| - string = string.toUpperCase().replaceAllMapped(_capitalizedAnsiEscape,
|
| + string = string.toUpperCase().replaceAllMapped(
|
| + _capitalizedAnsiEscape,
|
| (match) => match[0].toLowerCase());
|
|
|
| // Don't use [bold] because it's disabled under [withPrejudice].
|
| @@ -249,8 +250,8 @@ String format(String string) {
|
| ///
|
| /// If [endMessage] is omitted, then logs "Begin [startMessage]" before the
|
| /// operation and "End [startMessage]" after it.
|
| -Future ioAsync(String startMessage, Future operation,
|
| - [String endMessage(value)]) {
|
| +Future ioAsync(String startMessage, Future operation, [String
|
| + endMessage(value)]) {
|
| if (endMessage == null) {
|
| io("Begin $startMessage.");
|
| } else {
|
| @@ -269,10 +270,11 @@ Future ioAsync(String startMessage, Future operation,
|
|
|
| /// Logs the spawning of an [executable] process with [arguments] at [IO]
|
| /// level.
|
| -void process(String executable, List<String> arguments,
|
| - String workingDirectory) {
|
| - io("Spawning \"$executable ${arguments.join(' ')}\" in "
|
| - "${p.absolute(workingDirectory)}");
|
| +void process(String executable, List<String> arguments, String workingDirectory)
|
| + {
|
| + io(
|
| + "Spawning \"$executable ${arguments.join(' ')}\" in "
|
| + "${p.absolute(workingDirectory)}");
|
| }
|
|
|
| /// Logs the results of running [executable].
|
| @@ -289,8 +291,8 @@ void processResult(String executable, PubProcessResult result) {
|
| var numLines = 0;
|
| for (var line in output) {
|
| if (++numLines > 1000) {
|
| - buffer.writeln('[${output.length - 1000}] more lines of output '
|
| - 'truncated...]');
|
| + buffer.writeln(
|
| + '[${output.length - 1000}] more lines of output ' 'truncated...]');
|
| break;
|
| }
|
|
|
| @@ -519,7 +521,9 @@ class _JsonLogger {
|
| ///
|
| /// Always prints to stdout.
|
| void error(error, [stackTrace]) {
|
| - var errorJson = {"error": error.toString()};
|
| + var errorJson = {
|
| + "error": error.toString()
|
| + };
|
|
|
| if (stackTrace == null && error is Error) stackTrace = error.stackTrace;
|
| if (stackTrace != null) {
|
|
|