aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-11 12:01:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-11 12:01:04 +0200
commita880d01c59c6962f06b969552a524792239e9300 (patch)
tree802901c84462df5e1cc5b37eca4899ab31cb339a
parent3637cbc90ae6c6f36f2ba229663f04a371a1faee (diff)
Align verbosity levels with build2
This makes it simpler to map from one to the other.
-rw-r--r--bpkg/common-options.cli2
-rw-r--r--bpkg/diagnostics10
-rw-r--r--bpkg/rep-create.cxx4
-rw-r--r--bpkg/utility3
4 files changed, 12 insertions, 7 deletions
diff --git a/bpkg/common-options.cli b/bpkg/common-options.cli
index 2532665..25db69c 100644
--- a/bpkg/common-options.cli
+++ b/bpkg/common-options.cli
@@ -25,7 +25,7 @@ namespace bpkg
{
"<level>",
"Set the diagnostics verbosity to <level> between 0 (disabled) and
- 5 (lots of information). The default is 1. @@ Need to document
+ 6 (lots of information). The default is 1. @@ Need to document
further."
};
diff --git a/bpkg/diagnostics b/bpkg/diagnostics
index 2d7825a..f403d9f 100644
--- a/bpkg/diagnostics
+++ b/bpkg/diagnostics
@@ -56,10 +56,11 @@ namespace bpkg
//
// 0 - disabled
// 1 - high-level information messages
- // 2 - underlying commands being executed
- // 3 - information that could be helpful to the user
- // 4 - information that could be helpful to the developer
- // 5 - even more detailed information
+ // 2 - essential underlying commands that are being executed
+ // 3 - all underlying commands that are being executed
+ // 4 - information that could be helpful to the user
+ // 5 - information that could be helpful to the developer
+ // 6 - even more detailed information
//
// While uint8 is more than enough, use uint16 for the ease of printing.
//
@@ -70,6 +71,7 @@ namespace bpkg
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).
//
diff --git a/bpkg/rep-create.cxx b/bpkg/rep-create.cxx
index bfa4776..42e7d55 100644
--- a/bpkg/rep-create.cxx
+++ b/bpkg/rep-create.cxx
@@ -46,7 +46,7 @@ namespace bpkg
//
if (p.string ().front () == '.')
{
- level3 ([&]{trace << "skipping '" << p << "' in " << d;});
+ level4 ([&]{trace << "skipping '" << p << "' in " << d;});
continue;
}
@@ -211,7 +211,7 @@ namespace bpkg
manifest_parser mp (ifs, rf.string ());
repository_manifests ms (mp);
- level3 ([&]{trace << ms.size () - 1 << " prerequisite repository(s)";});
+ level4 ([&]{trace << ms.size () - 1 << " prerequisite repository(s)";});
}
catch (const manifest_parsing& e)
{
diff --git a/bpkg/utility b/bpkg/utility
index f2c0ab5..a5bafec 100644
--- a/bpkg/utility
+++ b/bpkg/utility
@@ -31,6 +31,9 @@ namespace bpkg
// Process.
//
+ // The process command line is printed for verbosity >= 2 (essential
+ // command lines).
+ //
void
run (const char* const args[]);