Skip to content

Commit

Permalink
Merge pull request flutter#20 from dart-lang/verbose_and_rev
Browse files Browse the repository at this point in the history
add Logger.isVerbose; rev version
  • Loading branch information
devoncarew authored May 26, 2017
2 parents 31c64f5 + 6d73e8c commit 97828ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## unreleased
## 0.1.1

- Updated to the output for indeterminate progress
- Exposed a `Logger.isVerbose` getter

## 0.1.0

Expand Down
6 changes: 6 additions & 0 deletions lib/cli_logging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ abstract class Logger {

Ansi get ansi;

bool get isVerbose;

/// Print an error message.
void stderr(String message);

Expand Down Expand Up @@ -102,6 +104,8 @@ class _StandardLogger implements Logger {
ansi ??= new Ansi(Ansi.terminalSupportsAnsi);
}

bool get isVerbose => false;

Progress _currentProgress;

void stderr(String message) {
Expand Down Expand Up @@ -230,6 +234,8 @@ class _VerboseLogger implements Logger {
_timer = new Stopwatch()..start();
}

bool get isVerbose => true;

void stderr(String message) {
flush();
_previousErr = '${ansi.red}$message${ansi.none}';
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cli_util
version: 0.1.0
version: 0.1.1
author: Dart Team <misc@dartlang.org>
description: A library to help in building Dart command-line apps.
homepage: https://github.com/dart-lang/cli_util
Expand Down

0 comments on commit 97828ad

Please sign in to comment.