mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Merge pull request #103028 from serathius/example-caller
Update logging example with caller
This commit is contained in:
commit
f4e7828674
@ -29,11 +29,11 @@ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-
|
||||
|
||||
Expected output:
|
||||
```
|
||||
{"ts":1622923409719.5137,"msg":"Log using Infof, key: value\n","v":0}
|
||||
{"ts":1622923409719.5403,"msg":"Log using InfoS","v":0,"key":"value"}
|
||||
{"ts":1622923409719.6025,"msg":"Log using Errorf, err: fail\n","v":0}
|
||||
{"ts":1622923409719.6077,"msg":"Log using ErrorS","err":"fail","v":0}
|
||||
{"ts":1622923409719.6467,"msg":"Log with sensitive key, data: {\"secret\"}\n","v":0}
|
||||
{"ts":1624215726270.3562,"caller":"cmd/logger.go:58","msg":"Log using Infof, key: value\n","v":0}
|
||||
{"ts":1624215726270.4377,"caller":"cmd/logger.go:59","msg":"Log using InfoS","v":0,"key":"value"}
|
||||
{"ts":1624215726270.6724,"caller":"cmd/logger.go:61","msg":"Log using Errorf, err: fail\n","v":0}
|
||||
{"ts":1624215726270.7566,"caller":"cmd/logger.go:62","msg":"Log using ErrorS","err":"fail","v":0}
|
||||
{"ts":1624215726270.8428,"caller":"cmd/logger.go:64","msg":"Log with sensitive key, data: {\"secret\"}\n","v":0}
|
||||
```
|
||||
|
||||
## Logging sanitization
|
||||
|
Loading…
Reference in New Issue
Block a user