Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 97828ad

Browse files
authored
Merge pull request #20 from dart-lang/verbose_and_rev
add Logger.isVerbose; rev version
2 parents 31c64f5 + 6d73e8c commit 97828ad

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Changelog
22

3-
## unreleased
3+
## 0.1.1
44

55
- Updated to the output for indeterminate progress
6+
- Exposed a `Logger.isVerbose` getter
67

78
## 0.1.0
89

lib/cli_logging.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ abstract class Logger {
6262

6363
Ansi get ansi;
6464

65+
bool get isVerbose;
66+
6567
/// Print an error message.
6668
void stderr(String message);
6769

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

107+
bool get isVerbose => false;
108+
105109
Progress _currentProgress;
106110

107111
void stderr(String message) {
@@ -230,6 +234,8 @@ class _VerboseLogger implements Logger {
230234
_timer = new Stopwatch()..start();
231235
}
232236

237+
bool get isVerbose => true;
238+
233239
void stderr(String message) {
234240
flush();
235241
_previousErr = '${ansi.red}$message${ansi.none}';

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cli_util
2-
version: 0.1.0
2+
version: 0.1.1
33
author: Dart Team <[email protected]>
44
description: A library to help in building Dart command-line apps.
55
homepage: https://github.com/dart-lang/cli_util

0 commit comments

Comments
 (0)