diff options
| author | Michael Vorburger ⛑️ <mike@vorburger.ch> | 2021-02-12 19:01:13 +0100 |
|---|---|---|
| committer | Michael Vorburger <mike@vorburger.ch> | 2021-02-12 19:06:54 +0100 |
| commit | befaff0f8ffe2c9651ca96cecbaf5c0c0f166658 (patch) | |
| tree | bd050a707369cd682b50b7ff00a3fc4105094977 | |
| parent | 1f4f5d38d68db2093a299c058e9f189a0e81f5be (diff) | |
Update logging guideline re. shared libraries
| -rw-r--r-- | contributors/devel/sig-instrumentation/logging.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contributors/devel/sig-instrumentation/logging.md b/contributors/devel/sig-instrumentation/logging.md index d7e052c0..0f3fa7de 100644 --- a/contributors/devel/sig-instrumentation/logging.md +++ b/contributors/devel/sig-instrumentation/logging.md @@ -4,6 +4,9 @@ The following conventions for the klog levels to use. [klog](http://godoc.org/github.com/kubernetes/klog) is globally preferred to [log](http://golang.org/pkg/log/) for better runtime control. +Shared libraries, such as `client-go`, should not use `klog.Errorf()` and `klog.Warningf()`, +but just return `error`, because client libraries may be used in CLI UIs that wish to control output. + * klog.Errorf() - Always an error * klog.Warningf() - Something unexpected, but probably not an error |
