Skip to content

Commit

Permalink
Make code generators log to stderr by default
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineco committed Jan 9, 2018
1 parent 55c5d75 commit d8924c1
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions staging/src/k8s.io/code-generator/cmd/client-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func main() {

genericArgs.AddFlags(pflag.CommandLine)
customArgs.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of client-gen
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func main() {

genericArgs.AddFlags(pflag.CommandLine)
customArgs.AddFlags(pflag.CommandLine)
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down
1 change: 1 addition & 0 deletions staging/src/k8s.io/code-generator/cmd/deepcopy-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func main() {

genericArgs.AddFlags(pflag.CommandLine)
customArgs.AddFlags(pflag.CommandLine)
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func main() {

genericArgs.AddFlags(pflag.CommandLine)
customArgs.AddFlags(pflag.CommandLine)
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var g = protobuf.New()

func init() {
g.BindFlags(flag.CommandLine)
goflag.Set("logtostderr", "true")
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
}

Expand Down
1 change: 1 addition & 0 deletions staging/src/k8s.io/code-generator/cmd/informer-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func main() {

genericArgs.AddFlags(pflag.CommandLine)
customArgs.AddFlags(pflag.CommandLine)
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down
1 change: 1 addition & 0 deletions staging/src/k8s.io/code-generator/cmd/lister-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func main() {

genericArgs.AddFlags(pflag.CommandLine)
customArgs.AddFlags(pflag.CommandLine)
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down
1 change: 1 addition & 0 deletions staging/src/k8s.io/code-generator/cmd/openapi-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func main() {

genericArgs.AddFlags(pflag.CommandLine)
customArgs.AddFlags(pflag.CommandLine)
flag.Set("logtostderr", "true")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down

0 comments on commit d8924c1

Please sign in to comment.