MCPcopy
hub / github.com/hyperledger/fabric / getLogLevelFromViper

Function getLogLevelFromViper

core/chaincode/config.go:112–120  ·  view source on GitHub ↗

getLogLevelFromViper gets the chaincode container log levels from viper

(key string)

Source from the content-addressed store, hash-verified

110
111// getLogLevelFromViper gets the chaincode container log levels from viper
112func getLogLevelFromViper(key string) string {
113 levelString := viper.GetString(key)
114 if !flogging.IsValidLevel(levelString) {
115 chaincodeLogger.Warningf("%s has invalid log level %s. defaulting to %s", key, levelString, flogging.DefaultLevel())
116 levelString = flogging.DefaultLevel()
117 }
118
119 return flogging.NameToLevel(levelString).String()
120}
121
122// DevModeUserRunsChaincode enables chaincode execution in a development
123// environment

Callers 1

loadMethod · 0.85

Calls 2

WarningfMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected