func init() { log15.Root().SetHandler(log15.StreamHandler(ioutil.Discard, helper.LogfmtFormat())) }
func init() { //log15.Root().SetHandler(log15.LvlFilterHandler(log15.LvlDebug, ext.FatalHandler(log15.StreamHandler(os.Stderr, helper.LogfmtFormat())))) log15.Root().SetHandler(log15.StreamHandler(ioutil.Discard, helper.LogfmtFormat())) }
// Before set before handler when start run cli.App func Before(ctx *cli.Context) error { lv := log15.LvlInfo if ctx.Bool("debug") { lv = log15.LvlDebug } log15.Root().SetHandler(log15.LvlFilterHandler(lv, ext.FatalHandler(log15.StreamHandler(os.Stderr, helper.LogfmtFormat())))) return nil }