aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/diagnostics.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-25 09:38:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-25 09:38:40 +0200
commit73fd1a275b7ed039ef3ca18a3706692e9e95177a (patch)
tree1565fca68586c4c23ac6ceedc507f8aed93e7d13 /libbuild2/diagnostics.hxx
parentaca0c7906724b2c0b648c06604e60fc3164e6f6a (diff)
Add --silent, remap verbosity 0 to 1 while building modules unless silent
Failed that, we may have long periods of seemingly nothing happening (e.g., during implicit bdep sync) while we quietly update the module, which may look like things have hung up.
Diffstat (limited to 'libbuild2/diagnostics.hxx')
-rw-r--r--libbuild2/diagnostics.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/diagnostics.hxx b/libbuild2/diagnostics.hxx
index 5d69132..26f602a 100644
--- a/libbuild2/diagnostics.hxx
+++ b/libbuild2/diagnostics.hxx
@@ -49,7 +49,7 @@ namespace build2
print_process (args.data (), n != 0 ? n : args.size ());
}
- // Program verbosity level (-v/--verbose).
+ // Program verbosity level (-v/--verbose plus --silent).
//
// 0 - disabled
// 1 - high-level information messages
@@ -59,13 +59,17 @@ namespace build2
// 5 - information helpful to the developer
// 6 - even more detailed information
//
+ // If silent is true, then the level must be 0 (silent is level 0 that
+ // cannot be relaxed in certain contexts).
+ //
// While uint8 is more than enough, use uint16 for the ease of printing.
//
// Forward-declarated in <libbuild2/utility.hxx>.
//
+ // const uint16_t verb_never = 7;
// extern uint16_t verb;
- // const uint16_t verb_never = 7;
+ // extern bool silent;
template <typename F> inline void l1 (const F& f) {if (verb >= 1) f ();}
template <typename F> inline void l2 (const F& f) {if (verb >= 2) f ();}