Skip to content

Commit afb5419

Browse files
prestonvasquezblink1073matthewdale
authored andcommitted
GODRIVER-2891 Add documentation for log levels (#1312)
Co-authored-by: Steven Silvester <[email protected]> Co-authored-by: Matt Dale <[email protected]>
1 parent 8857a04 commit afb5419

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mongo/options/loggeroptions.go

+12
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ type LogSink interface {
5151
// Info logs a non-error message with the given key/value pairs. This
5252
// method will only be called if the provided level has been defined
5353
// for a component in the LoggerOptions.
54+
//
55+
// Here are the following level mappings for V = "Verbosity":
56+
//
57+
// - V(0): off
58+
// - V(1): informational
59+
// - V(2): debugging
60+
//
61+
// This level mapping is taken from the go-logr/logr library
62+
// specifications, specifically:
63+
//
64+
// "Level V(0) is the default, and logger.V(0).Info() has the same
65+
// meaning as logger.Info()."
5466
Info(level int, message string, keysAndValues ...interface{})
5567

5668
// Error logs an error message with the given key/value pairs

0 commit comments

Comments
 (0)