Skip to content

Commit

Permalink
log streaming plugin loading errors with app.logger (#1356)
Browse files Browse the repository at this point in the history
* log with app.logger

* add changelog entry
  • Loading branch information
egaxhaj authored Feb 10, 2023
1 parent cfe0ca1 commit 1d74145
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

* nothing
### Bug Fixes

* Correctly log streaming plugin loading errors [PR 1356](https://github.com/provenance-io/provenance/pull/1356).

---

Expand Down
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,11 @@ func (app *App) RegisterStreamingServices(appOpts servertypes.AppOptions) {
logLevel := cast.ToString(appOpts.Get(flags.FlagLogLevel))
plugin, err := streaming.NewStreamingPlugin(pluginName, logLevel)
if err != nil {
app.Logger().Error("failed to load streaming plugin: %s", err)
app.Logger().Error("failed to load streaming plugin", "error", err)
os.Exit(1)
}
if err := baseapp.RegisterStreamingPlugin(app.BaseApp, appOpts, app.keys, plugin); err != nil {
app.Logger().Error("failed to register streaming plugin: %s", err)
app.Logger().Error("failed to register streaming plugin", "error", err)
os.Exit(1)
}
app.Logger().Info("streaming service registered", "service", service, "plugin", pluginName)
Expand Down

0 comments on commit 1d74145

Please sign in to comment.