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:
parent
072ebeacdb
commit
e7b7dc4b9d
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue