Skip to content

Commit 767f55d

Browse files
committed
[FAB-5000] Reduce logging severity at MSP startup
There are some warning log invocations at MSP configuration loading that don't point at actual problems, and should be reduced to DEBUG Change-Id: I55bd3df8071bc9d4422be82f46c93e19fb94b97a Signed-off-by: Yacov Manevich <[email protected]>
1 parent efbaee5 commit 767f55d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

msp/configbuilder.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -183,31 +183,31 @@ func getMspConfig(dir string, ID string, sigid *msp.SigningIdentityInfo) (*msp.M
183183

184184
intermediatecerts, err := getPemMaterialFromDir(intermediatecertsDir)
185185
if os.IsNotExist(err) {
186-
mspLogger.Warningf("Intermediate certs folder not found at [%s]. Skipping. [%s]", intermediatecertsDir, err)
186+
mspLogger.Debugf("Intermediate certs folder not found at [%s]. Skipping. [%s]", intermediatecertsDir, err)
187187
} else if err != nil {
188188
return nil, fmt.Errorf("Failed loading intermediate ca certs at [%s]: [%s]", intermediatecertsDir, err)
189189
}
190190

191191
tlsCACerts, err := getPemMaterialFromDir(tlscacertDir)
192192
tlsIntermediateCerts := [][]byte{}
193193
if os.IsNotExist(err) {
194-
mspLogger.Warningf("TLS CA certs folder not found at [%s]. Skipping and ignoring TLS intermediate CA folder. [%s]", tlsintermediatecertsDir, err)
194+
mspLogger.Debugf("TLS CA certs folder not found at [%s]. Skipping and ignoring TLS intermediate CA folder. [%s]", tlsintermediatecertsDir, err)
195195
} else if err != nil {
196196
return nil, fmt.Errorf("Failed loading TLS ca certs at [%s]: [%s]", tlsintermediatecertsDir, err)
197197
} else if len(tlsCACerts) != 0 {
198198
tlsIntermediateCerts, err = getPemMaterialFromDir(tlsintermediatecertsDir)
199199
if os.IsNotExist(err) {
200-
mspLogger.Warningf("TLS intermediate certs folder not found at [%s]. Skipping. [%s]", tlsintermediatecertsDir, err)
200+
mspLogger.Debugf("TLS intermediate certs folder not found at [%s]. Skipping. [%s]", tlsintermediatecertsDir, err)
201201
} else if err != nil {
202202
return nil, fmt.Errorf("Failed loading TLS intermediate ca certs at [%s]: [%s]", tlsintermediatecertsDir, err)
203203
}
204204
} else {
205-
mspLogger.Warningf("TLS CA certs folder at [%s] is empty. Skipping.", tlsintermediatecertsDir)
205+
mspLogger.Debugf("TLS CA certs folder at [%s] is empty. Skipping.", tlsintermediatecertsDir)
206206
}
207207

208208
crls, err := getPemMaterialFromDir(crlsDir)
209209
if os.IsNotExist(err) {
210-
mspLogger.Warningf("crls folder not found at [%s]. Skipping. [%s]", crlsDir, err)
210+
mspLogger.Debugf("crls folder not found at [%s]. Skipping. [%s]", crlsDir, err)
211211
} else if err != nil {
212212
return nil, fmt.Errorf("Failed loading crls at [%s]: [%s]", crlsDir, err)
213213
}
@@ -247,7 +247,7 @@ func getMspConfig(dir string, ID string, sigid *msp.SigningIdentityInfo) (*msp.M
247247
}
248248
}
249249
} else {
250-
mspLogger.Infof("MSP configuration file not found at [%s]: [%s]", configFile, err)
250+
mspLogger.Debugf("MSP configuration file not found at [%s]: [%s]", configFile, err)
251251
}
252252

253253
// Set FabricCryptoConfig

0 commit comments

Comments
 (0)