Skip to content

Commit 5b199cd

Browse files
committedMay 28, 2020
Fix documentation for V(level)
The documentation for V(level) was incorrect; it erroneously claimed that higher V() levels will get logged, whereas in reality lower levels will get logged. No functional change.
1 parent 72e000d commit 5b199cd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎klog.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -1236,9 +1236,10 @@ func newVerbose(level Level, b bool) Verbose {
12361236
// not evaluate its arguments.
12371237
//
12381238
// Whether an individual call to V generates a log record depends on the setting of
1239-
// the -v and --vmodule flags; both are off by default. If the level in the call to
1240-
// V is at least the value of -v, or of -vmodule for the source file containing the
1241-
// call, the V call will log.
1239+
// the -v and -vmodule flags; both are off by default. The V call will log if its level
1240+
// is less than or equal to the value of the -v flag, or alternatively if its level is
1241+
// less than or equal to the value of the -vmodule pattern matching the source file
1242+
// containing the call.
12421243
func V(level Level) Verbose {
12431244
// This function tries hard to be cheap unless there's work to do.
12441245
// The fast path is two atomic loads and compares.

0 commit comments

Comments
 (0)
Please sign in to comment.