diff --git a/CHANGELOG.md b/CHANGELOG.md index 661d890e209..308fdcd22bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ Every Module contains its own CHANGELOG.md. Please refer to the module you are i * (runtime) [#18475](https://github.com/cosmos/cosmos-sdk/pull/18475) Adds an implementation for core.branch.Service. * (baseapp) [#18499](https://github.com/cosmos/cosmos-sdk/pull/18499) Add `MsgRouter` response type from message name function. * (types) [#18768](https://github.com/cosmos/cosmos-sdk/pull/18768) Add MustValAddressFromBech32 function. +* (gRPC) [#19049](https://github.com/cosmos/cosmos-sdk/pull/19049) Add debug log prints for each gRPC request. ### Improvements diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 2309ed135c6..ebdb2320886 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -193,7 +193,7 @@ func NewBaseApp( name string, logger log.Logger, db dbm.DB, txDecoder sdk.TxDecoder, options ...func(*BaseApp), ) *BaseApp { app := &BaseApp{ - logger: logger, + logger: logger.With(log.ModuleKey, "baseapp"), name: name, db: db, cms: store.NewCommitMultiStore(db, logger, storemetrics.NewNoOpMetrics()), // by default we use a no-op metric gather in store diff --git a/baseapp/grpcserver.go b/baseapp/grpcserver.go index 20ea6ecac1d..2d11818a462 100644 --- a/baseapp/grpcserver.go +++ b/baseapp/grpcserver.go @@ -2,6 +2,7 @@ package baseapp import ( "context" + "fmt" "strconv" gogogrpc "github.com/cosmos/gogoproto/grpc" @@ -67,6 +68,8 @@ func (app *BaseApp) RegisterGRPCServer(server gogogrpc.Server) { app.logger.Error("failed to set gRPC header", "err", err) } + app.logger.Debug("gRPC query received of type: " + fmt.Sprintf("%#v", req)) + return handler(grpcCtx, req) }