1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 18:38:40 +00:00

fix: cli logs not working (#8110)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-08-24 18:17:20 +02:00 committed by GitHub
parent 072ebeacdb
commit e7b7dc4b9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@ package main
import (
"flag"
"fmt"
"os"
"strconv"
@ -32,6 +33,10 @@ func main() {
func configureLogs(cli *cobra.Command) {
logging.InitFlags(nil)
if err := logging.Setup(logging.TextFormat, 0); err != nil {
fmt.Println("failed to setup logging", err)
os.Exit(1)
}
cli.PersistentFlags().AddGoFlagSet(flag.CommandLine)
}