Merge PR #4625: Implement logger on all module keepers

This commit is contained in:
Aayushi Jain
2019-06-26 12:41:14 -04:00
committed by Alexander Bezobchuk
parent 67f6b02118
commit c898dac6a9
14 changed files with 57 additions and 19 deletions
+4 -1
View File
@@ -1,9 +1,12 @@
package params
import (
"fmt"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/params/subspace"
"github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/tendermint/tendermint/libs/log"
)
@@ -32,7 +35,7 @@ func NewKeeper(cdc *codec.Codec, key *sdk.KVStoreKey, tkey *sdk.TransientStoreKe
// Logger returns a module-specific logger.
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", "x/params")
return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName))
}
// Allocate subspace used for keepers