package main import ( "os" logging "github.com/ipfs/go-log/v2" "github.com/urfave/cli/v2" "github.com/filecoin-project/lotus/build" ) var log = logging.Logger("lotus-shed") func main() { _ = logging.SetLogLevel("*", "INFO") _ = logging.SetLogLevelRegex("badger*", "ERROR") _ = logging.SetLogLevel("drand", "ERROR") _ = logging.SetLogLevel("chainstore", "ERROR") local := []*cli.Command{ addressCmd, base64Cmd, base32Cmd, base16Cmd, bitFieldCmd, cronWcCmd, frozenMinersCmd, dealLabelCmd, keyinfoCmd, jwtCmd, noncefix, bigIntParseCmd, staterootCmd, auditsCmd, importCarCmd, importObjectCmd, commpToCidCmd, fetchParamCmd, postFindCmd, proofsCmd, verifRegCmd, marketCmd, miscCmd, mpoolCmd, helloCmd, genesisVerifyCmd, mathCmd, minerCmd, mpoolStatsCmd, exportChainCmd, ethCmd, exportCarCmd, consensusCmd, syncCmd, stateTreePruneCmd, datastoreCmd, ledgerCmd, sectorsCmd, msgCmd, electionCmd, rpcCmd, cidCmd, blockmsgidCmd, signaturesCmd, actorCmd, minerTypesCmd, minerPeeridCmd, minerMultisigsCmd, splitstoreCmd, fr32Cmd, chainCmd, balancerCmd, sendCsvCmd, terminationsCmd, migrationsCmd, diffCmd, itestdCmd, msigCmd, fip36PollCmd, invariantsCmd, gasTraceCmd, replayOfflineCmd, } app := &cli.App{ Name: "lotus-shed", Usage: "A place for all the lotus tools", Version: build.UserVersion(), Commands: local, Flags: []cli.Flag{ &cli.StringFlag{ Name: "log-level", Value: "info", }, }, Before: func(cctx *cli.Context) error { return logging.SetLogLevel("lotus-shed", cctx.String("log-level")) }, } if err := app.Run(os.Args); err != nil { log.Errorf("%+v", err) os.Exit(1) return } }