github.com/yasker/longhorn-engine@v0.0.0-20160621014712-6ed6cfca0729/app/stats.go (about) 1 package app 2 3 import ( 4 "github.com/Sirupsen/logrus" 5 "github.com/codegangsta/cli" 6 ) 7 8 // Journal flush operations since last flush 9 func Journal() cli.Command { 10 return cli.Command{ 11 Name: "journal", 12 Flags: []cli.Flag{ 13 cli.IntFlag{ 14 Name: "limit", 15 Value: 0, 16 }, 17 }, 18 Action: func(c *cli.Context) { 19 controllerClient := getCli(c) 20 err := controllerClient.ListJournal(c.Int("limit")) 21 if err != nil { 22 logrus.Fatalln("Error running journal command:", err) 23 } 24 }, 25 } 26 }