You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: hack/tools/logcheck/testdata/data.go
+3
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ func printUnstructuredLog() {
39
39
klog.Fatalf("test log") // want `unstructured logging function "Fatalf" should not be used`
40
40
klog.Fatalln("test log") // want `unstructured logging function "Fatalln" should not be used`
41
41
klog.FatalDepth(1, "test log") // want `unstructured logging function "FatalDepth" should not be used`
42
+
42
43
}
43
44
44
45
funcprintStructuredLog() {
@@ -53,4 +54,6 @@ func printStructuredLog() {
53
54
klog.InfoS("Starting container in a pod", map[string]string{"test1": "value"}, "containerID") // want `Key positional arguments are expected to be inlined constant strings. `
54
55
testKey:="a"
55
56
klog.ErrorS(nil, "Starting container in a pod", testKey, "containerID") // want `Key positional arguments are expected to be inlined constant strings. `
57
+
klog.InfoS("test: %s", "testname") // want `structured logging function "InfoS" should not use format specifier "%s"`
58
+
klog.ErrorS(nil, "test no.: %d", 1) // want `structured logging function "ErrorS" should not use format specifier "%d"`
0 commit comments