Skip to content

Commit

Permalink
Update log level for some BCCSP keystore messages
Browse files Browse the repository at this point in the history
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 <wtlahti@us.ibm.com>
  • Loading branch information
wlahti committed Feb 24, 2017
1 parent 709d87b commit b52b676
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bccsp/pkcs11/fileks.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,10 @@ func (ks *FileBasedKeyStore) createKeyStoreIfNotExists() error {
// Check keystore directory
ksPath := ks.path
missing, err := utils.DirMissingOrEmpty(ksPath)
logger.Infof("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))

if missing {
logger.Debugf("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))

err := ks.createKeyStore()
if err != nil {
logger.Errorf("Failed creating KeyStore At [%s]: [%s]", ksPath, err.Error())
Expand Down
3 changes: 2 additions & 1 deletion bccsp/sw/fileks.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,10 @@ func (ks *fileBasedKeyStore) createKeyStoreIfNotExists() error {
// Check keystore directory
ksPath := ks.path
missing, err := utils.DirMissingOrEmpty(ksPath)
logger.Infof("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))

if missing {
logger.Debugf("KeyStore path [%s] missing [%t]: [%s]", ksPath, missing, utils.ErrToString(err))

err := ks.createKeyStore()
if err != nil {
logger.Errorf("Failed creating KeyStore At [%s]: [%s]", ksPath, err.Error())
Expand Down

0 comments on commit b52b676

Please sign in to comment.