Skip to content

Commit

Permalink
Merge pull request #265 from wangzhen127/glog
Browse files Browse the repository at this point in the history
Disable glog writing to files for log-counter
  • Loading branch information
k8s-ci-robot authored Apr 3, 2019
2 parents 8ec3a76 + 7e766a4 commit 4880be8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/logcounter/log_counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package main

import (
"flag"
"fmt"
"os"

Expand All @@ -28,6 +29,12 @@ import (
)

func main() {
// Set glog flag so that it does not log to files.
if err := flag.Set("logtostderr", "true"); err != nil {
fmt.Printf("Failed to set logtostderr=true: %v", err)
os.Exit(int(types.Unknown))
}

fedo := options.NewLogCounterOptions()
fedo.AddFlags(pflag.CommandLine)
pflag.Parse()
Expand Down

0 comments on commit 4880be8

Please sign in to comment.