mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
Fresh dep ensure
This commit is contained in:
22
vendor/k8s.io/klog/examples/set_output/usage_set_output.go
generated
vendored
Normal file
22
vendor/k8s.io/klog/examples/set_output/usage_set_output.go
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"flag"
|
||||
"fmt"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
flag.Set("logtostderr", "false")
|
||||
flag.Set("alsologtostderr", "false")
|
||||
flag.Parse()
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
klog.SetOutput(buf)
|
||||
klog.Info("nice to meet you")
|
||||
klog.Flush()
|
||||
|
||||
fmt.Printf("LOGGED: %s", buf.String())
|
||||
}
|
Reference in New Issue
Block a user