kubernetes/pkg/controller
Patrick Ohly 9eaa2dc554 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.
2022-01-12 07:48:36 +01:00
..
apis/config
bootstrap
certificates fix curent to current 2021-12-17 03:33:22 +09:00
clusterroleaggregation
cronjob Merge pull request #105264 from devincd/fix_typo 2022-01-06 17:40:29 -08:00
daemon
deployment
disruption
endpoint
endpointslice Improving performance of EndpointSlice controller metrics cache 2021-12-20 10:26:47 -08:00
endpointslicemirroring
garbagecollector refactor garbagecollection controllers to make forget impossible to forget 2022-01-09 15:19:10 +08:00
history
job
namespace
nodeipam Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
nodelifecycle avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
podautoscaler Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
podgc Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
replicaset avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
replication
resourcequota avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
serviceaccount Merge pull request #102636 from charlesxsh/svcacct-ctrl-test 2022-01-05 21:12:27 -08:00
statefulset
storageversiongc
testutil
ttl
ttlafterfinished
util
volume avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
controller_ref_manager.go
controller_ref_manager_test.go
controller_utils.go
controller_utils_test.go
doc.go
lookup_cache.go
OWNERS