Skip to content

Commit b52b676

Browse files
committed
Update log level for some BCCSP keystore messages
This change updates two BCCSP keystore log messages to use Debugf instead of Infof and moves them inside the if statement to only log when the keystore doesn't exist. https://jira.hyperledger.org/browse/FAB-1870 Change-Id: I0bf6a6da8d7ba0a76a44e80c90ac53799eb6e65c Signed-off-by: Will Lahti <[email protected]>
1 parent 709d87b commit b52b676

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bccsp/pkcs11/fileks.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,10 @@ func (ks *FileBasedKeyStore) createKeyStoreIfNotExists() error {
329329
// Check keystore directory
330330
ksPath := ks.path
331331
missing, err := utils.DirMissingOrEmpty(ksPath)
332-
logger.Infof("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))
333332

334333
if missing {
334+
logger.Debugf("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))
335+
335336
err := ks.createKeyStore()
336337
if err != nil {
337338
logger.Errorf("Failed creating KeyStore At [%s]: [%s]", ksPath, err.Error())

bccsp/sw/fileks.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,10 @@ func (ks *fileBasedKeyStore) createKeyStoreIfNotExists() error {
361361
// Check keystore directory
362362
ksPath := ks.path
363363
missing, err := utils.DirMissingOrEmpty(ksPath)
364-
logger.Infof("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))
365364

366365
if missing {
366+
logger.Debugf("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))
367+
367368
err := ks.createKeyStore()
368369
if err != nil {
369370
logger.Errorf("Failed creating KeyStore At [%s]: [%s]", ksPath, err.Error())

0 commit comments

Comments
 (0)