Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWeng committed Apr 14, 2023
1 parent f8a4029 commit 64b3018
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,11 @@ func startInProcess(
if cpuProfile := ctx.Viper.GetString(flagCPUProfile); cpuProfile != "" {
f, err := os.Create(cpuProfile)
if err != nil {
return err
return fmt.Errorf("failed to create cpuProfile file %w", err)
}

ctx.Logger.Info("starting CPU profiler", "profile", cpuProfile)
if err := pprof.StartCPUProfile(f); err != nil {
return err
return fmt.Errorf("failed to start CPU Profiler %w", err)
}

cpuProfileCleanup = func() {
Expand Down Expand Up @@ -369,17 +368,14 @@ func startInProcess(
tracerProviderOptions,
nodeMetricsProvider,
)
ctx.Logger.Info("really going to start new node")
if err != nil {
return fmt.Errorf("error creating node: %w", err)
}
if err := tmNode.Start(goCtx); err != nil {
return fmt.Errorf("error starting node: %w", err)
}
ctx.Logger.Info("started ABCI Tendermint")
}

ctx.Logger.Info("starting GPRC")
// Add the tx service to the gRPC router. We only need to register this
// service if API or gRPC is enabled, and avoid doing so in the general
// case, because it spawns a new local tendermint RPC client.
Expand All @@ -394,7 +390,6 @@ func startInProcess(
app.RegisterTendermintService(clientCtx)
}

ctx.Logger.Info("starting API")
var apiSrv *api.Server
if config.API.Enable {
clientCtx := clientCtx.WithHomeDir(home).WithChainID(clientCtx.ChainID)
Expand Down

0 comments on commit 64b3018

Please sign in to comment.