diff --git a/cmd/booster-bitswap/init.go b/cmd/booster-bitswap/init.go index 4b58176e6..e4af95c9f 100644 --- a/cmd/booster-bitswap/init.go +++ b/cmd/booster-bitswap/init.go @@ -6,7 +6,6 @@ import ( "os" "path/filepath" - "github.com/filecoin-project/boost/build" "github.com/libp2p/go-libp2p" crypto "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/host" @@ -115,13 +114,3 @@ var initCmd = &cli.Command{ return err }, } - -var versionCmd = &cli.Command{ - Name: "version", - Usage: "Print booster-bitswap version", - Before: before, - Action: func(cctx *cli.Context) error { - fmt.Println("booster-bitswap " + build.UserVersion()) - return nil - }, -} diff --git a/cmd/booster-bitswap/main.go b/cmd/booster-bitswap/main.go index e2bdb4a93..468d18145 100644 --- a/cmd/booster-bitswap/main.go +++ b/cmd/booster-bitswap/main.go @@ -3,6 +3,7 @@ package main import ( "os" + "github.com/filecoin-project/boost/build" "github.com/filecoin-project/boostd-data/shared/cliutil" logging "github.com/ipfs/go-log/v2" "github.com/urfave/cli/v2" @@ -22,8 +23,8 @@ func main() { Name: "booster-bitswap", Usage: "Bitswap endpoint for retrieval from Filecoin", EnableBashCompletion: true, + Version: build.UserVersion(), Flags: []cli.Flag{ - cliutil.FlagVerbose, cliutil.FlagVeryVerbose, FlagRepo, }, @@ -31,7 +32,6 @@ func main() { initCmd, runCmd, fetchCmd, - versionCmd, }, } app.Setup() @@ -43,10 +43,8 @@ func main() { func before(cctx *cli.Context) error { _ = logging.SetLogLevel("booster", "INFO") + _ = logging.SetLogLevel("remote-blockstore", "INFO") - if cliutil.IsVerbose { - _ = logging.SetLogLevel("remote-blockstore", "INFO") - } if cliutil.IsVeryVerbose { _ = logging.SetLogLevel("booster", "DEBUG") _ = logging.SetLogLevel("remote-blockstore", "DEBUG") diff --git a/cmd/booster-http/main.go b/cmd/booster-http/main.go index 20b9531f9..bb0c3db21 100644 --- a/cmd/booster-http/main.go +++ b/cmd/booster-http/main.go @@ -3,6 +3,7 @@ package main import ( "os" + "github.com/filecoin-project/boost/build" "github.com/filecoin-project/boostd-data/shared/cliutil" logging "github.com/ipfs/go-log/v2" "github.com/urfave/cli/v2" @@ -22,8 +23,8 @@ func main() { Name: "booster-http", Usage: "HTTP endpoint for retrieval from Filecoin", EnableBashCompletion: true, + Version: build.UserVersion(), Flags: []cli.Flag{ - cliutil.FlagVerbose, cliutil.FlagVeryVerbose, FlagRepo, }, @@ -40,10 +41,8 @@ func main() { func before(cctx *cli.Context) error { _ = logging.SetLogLevel("booster", "INFO") + _ = logging.SetLogLevel("remote-blockstore", "INFO") - if cliutil.IsVerbose { - _ = logging.SetLogLevel("remote-blockstore", "INFO") - } if cliutil.IsVeryVerbose { _ = logging.SetLogLevel("booster", "DEBUG") _ = logging.SetLogLevel("remote-blockstore", "DEBUG")