Skip to content

Commit f37a5a1

Browse files
authored
Merge pull request #291 from Random-Liu/do-not-log
Disable glog writing to files.
2 parents db53d78 + 33701ad commit f37a5a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/crictl/main.go

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package main
1818

1919
import (
20+
"flag"
2021
"fmt"
2122
"os"
2223
"sort"
@@ -88,6 +89,10 @@ func getRuntimeService(context *cli.Context) (cri.RuntimeService, error) {
8889
}
8990

9091
func main() {
92+
// Do not log to files.
93+
if err := flag.Set("logtostderr", "true"); err != nil {
94+
logrus.WithError(err).Fatal("Failed to set logtostderr=true")
95+
}
9196
app := cli.NewApp()
9297
app.Name = "crictl"
9398
app.Usage = "client for CRI"

0 commit comments

Comments
 (0)