We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb02c45 + 68ef51c commit e2fd555Copy full SHA for e2fd555
1 file changed
logr.go
@@ -115,6 +115,15 @@ limitations under the License.
115
// may be any Go value, but how the value is formatted is determined by the
116
// LogSink implementation.
117
//
118
+// Logger instances are meant to be passed around by value. Code that receives
119
+// such a value can call its methods without having to check whether the
120
+// instance is ready for use.
121
+//
122
+// Calling methods with the null logger (Logger{}) as instance will crash
123
+// because it has no LogSink. Therefore this null logger should never be passed
124
+// around. For cases where passing a logger is optional, a pointer to Logger
125
+// should be used.
126
127
// Key Naming Conventions
128
129
// Keys are not strictly required to conform to any specification or regex, but
0 commit comments