summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/log/tool_logger.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/log/tool_logger.go b/common/log/tool_logger.go
index 7295c8373d4..61a2492c0af 100644
--- a/common/log/tool_logger.go
+++ b/common/log/tool_logger.go
@@ -125,6 +125,12 @@ func init() {
}
}
+// IsInVerbosity returns true if the current verbosity level setting is
+// greater than or equal to the given level.
+func IsInVerbosity(minVerb int) bool {
+ return minVerb <= globalToolLogger.verbosity
+}
+
func Logf(minVerb int, format string, a ...interface{}) {
globalToolLogger.Logf(minVerb, format, a...)
}