From eb264e1892c2a1379fa3bcab9aefea219e8e7138 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 8 Sep 2015 10:56:32 +0200 Subject: Rework diagnostics verbosity, add quiet mode/option --- build/diagnostics | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'build/diagnostics') diff --git a/build/diagnostics b/build/diagnostics index ab4c4a2..6e54f56 100644 --- a/build/diagnostics +++ b/build/diagnostics @@ -94,14 +94,15 @@ namespace build print_process (args.data (), args.size ()); } - // Trace verbosity level. + // Verbosity level. // - // 0 - tracing disabled. - // 1 - command lines to update explicit targets (e.g., .o) - // 2 - command lines to update implicit targets (e.g., .d) - // 3 - things didn't work out (e.g., rule did not match) - // 4 - additional information - // 5 - more additional information + // 0 - disabled + // 1 - high-level information messages + // 2 - essential underlying commands that are being executed + // 3 - all underlying commands that are being executed + // 4 - information helpful to the user (e.g., why a rule did not match) + // 5 - information helpful to the developer + // 6 - even more detailed information // // While uint8 is more than enough, use uint16 for the ease of printing. // @@ -112,6 +113,7 @@ namespace build template inline void level3 (const F& f) {if (verb >= 3) f ();} template inline void level4 (const F& f) {if (verb >= 4) f ();} template inline void level5 (const F& f) {if (verb >= 5) f ();} + template inline void level6 (const F& f) {if (verb >= 6) f ();} // Diagnostic facility, base infrastructure (potentially reusable). // @@ -315,7 +317,7 @@ namespace build // Here is the absolute/relative path rationale: we want it absolute // in the error/warning/info streams to give the user the complete // picture. But in the text stream (e.g., command lines), we print - // relative unless verbosity is greater than 0. + // relative unless verbosity is greater than 1. // struct basic_mark_base { @@ -364,7 +366,7 @@ namespace build simple_prologue operator() () const { - return simple_prologue (type_, name_, verb == 0); + return simple_prologue (type_, name_, verb <= 1); } }; typedef diag_mark text_mark; -- cgit v1.1