apiserver/pkg/registry/generic/registry
Patrick Ohly ec795ae204 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.

Kubernetes-commit: 9eaa2dc554e0c3d4485d4c916dfdbc2f517db2e0
2021-12-11 12:10:21 +01:00
..
decorated_watcher.go Fix closing of decorated watcher channel on timeout 2021-06-02 14:05:52 -04:00
decorated_watcher_test.go Fix closing of decorated watcher channel on timeout 2021-06-02 14:05:52 -04:00
doc.go Mechanical fixup imports: pkg/genericapiserver 2017-02-13 07:36:41 -05:00
dryrun.go Simplify storage.Interface by merging Watch and WatchList functions. 2021-11-18 12:40:26 +01:00
dryrun_test.go Introduce storagebackend.ConfigForResource 2021-08-29 01:06:12 -04:00
storage_factory.go avoid klog Info calls without verbosity 2021-12-11 12:10:21 +01:00
store.go Slightly improve reliability of storage List tests. 2021-12-10 12:05:32 +01:00
store_test.go fix goroutine leak in the DeleteCollection 2021-10-11 20:21:27 +08:00