mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 22:23:15 +00:00
Work around glog flag.Parse issue
Due to a change in glog, if you don't call flag.Parse, every log line prints out 'ERROR: logging before flag.Parse'. This works around that change. Ultimately we need to switch to a different logging library. Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
|
||||
func NewCommand(name string) *cobra.Command {
|
||||
c := &cobra.Command{
|
||||
Use: name,
|
||||
Use: name,
|
||||
Short: "Back up and restore Kubernetes cluster resources.",
|
||||
Long: `Heptio Ark is a tool for managing disaster recovery, specifically for
|
||||
Kubernetes cluster resources. It provides a simple, configurable,
|
||||
@@ -53,5 +53,10 @@ associated data.`,
|
||||
// add the glog flags
|
||||
c.PersistentFlags().AddGoFlagSet(flag.CommandLine)
|
||||
|
||||
// TODO: switch to a different logging library.
|
||||
// Work around https://github.com/golang/glog/pull/13.
|
||||
// See also https://github.com/kubernetes/kubernetes/issues/17162
|
||||
flag.CommandLine.Parse([]string{})
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user