Skip to content

Commit

Permalink
refactor(services): add suggestions for logging on serve failure (#…
Browse files Browse the repository at this point in the history
…3943)

Currently when `serve` fails, it shows
```
Blockchain failed to start.                           
If the new code is no longer compatible with the saved
state, you can reset the database by launching:       
ignite chain serve --reset-once         
```

Considering this will the entry point for many folks new to Ignite, probably adding a suggestion for verbose logging is a trivial, but helpful addition.

Cheers.
  • Loading branch information
AbhinavMir authored Feb 5, 2024
1 parent 21f4352 commit 86df442
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ignite/services/chain/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ func (c *Chain) Serve(ctx context.Context, cacheStorage cache.Storage, options .
info := colors.Info(
"Blockchain failed to start.\n",
"If the new code is no longer compatible with the saved\n",
"state, you can reset the database by launching:",
"state, you can reset the database by launching:\n",
"For more verbose logging, add -v to the command.",
)
command := colors.SprintFunc(colors.White)("ignite chain serve --reset-once")

command := colors.SprintFunc(colors.White)("ignite chain serve --reset-once -v")
return errors.Errorf("cannot run %s\n\n%s\n%s", startErr.AppName, info, command)
}

Expand Down

0 comments on commit 86df442

Please sign in to comment.