Merge PR #4625: Implement logger on all module keepers
This commit is contained in:
committed by
Alexander Bezobchuk
parent
67f6b02118
commit
c898dac6a9
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user