Skip to content

Commit

Permalink
Initialize Klog explicitly using InitFlags (lyft#40)
Browse files Browse the repository at this point in the history
* Initialize Klog explicitly using InitFlags
  • Loading branch information
anandswaminathan authored Jul 8, 2019
1 parent f920664 commit 9a95850
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/flinkk8soperator/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"os"
"strings"

"k8s.io/klog"

"sigs.k8s.io/controller-runtime/pkg/cache"

"github.com/lyft/flytestdlib/config/viper"
Expand Down Expand Up @@ -71,6 +73,7 @@ func Run(config *controllerConfig.Config) error {
func init() {
// See https://gist.github.com/nak3/78a32817a8a3950ae48f239a44cd3663
// allows `$ flinkoperator --logtostderr` to work
klog.InitFlags(nil)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
err := flag.CommandLine.Parse([]string{})
if err != nil {
Expand Down

0 comments on commit 9a95850

Please sign in to comment.