Skip to content

Commit

Permalink
Disable glog writing to files for log-counter
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhen127 committed Apr 3, 2019
1 parent 8ec3a76 commit 7e766a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/logcounter/log_counter.go
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 7e766a4

Please sign in to comment.