From 73fd1a275b7ed039ef3ca18a3706692e9e95177a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 25 Oct 2019 09:38:40 +0200 Subject: 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. --- libbuild2/diagnostics.hxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libbuild2/diagnostics.hxx') 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 . // + // const uint16_t verb_never = 7; // extern uint16_t verb; - // const uint16_t verb_never = 7; + // extern bool silent; template inline void l1 (const F& f) {if (verb >= 1) f ();} template inline void l2 (const F& f) {if (verb >= 2) f ();} -- cgit v1.1