aboutsummaryrefslogtreecommitdiff
path: root/build/diagnostics
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-08 10:56:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-08 10:56:32 +0200
commiteb264e1892c2a1379fa3bcab9aefea219e8e7138 (patch)
tree1031f859076b2d8f117a2948ec1184a5536f9cbc /build/diagnostics
parent55471ef43695408bae2237374be4637c302d1c87 (diff)
Rework diagnostics verbosity, add quiet mode/option
Diffstat (limited to 'build/diagnostics')
-rw-r--r--build/diagnostics20
1 files changed, 11 insertions, 9 deletions
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 <typename F> inline void level3 (const F& f) {if (verb >= 3) f ();}
template <typename F> inline void level4 (const F& f) {if (verb >= 4) f ();}
template <typename F> inline void level5 (const F& f) {if (verb >= 5) f ();}
+ template <typename F> 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_base> text_mark;