Skip to content

Commit fab5d97

Browse files
committed
[FAB-10132] Align outlier peer CLI success msg log lvl
The "peer channel fetch" and "peer chaincode install" commands currently log their success output message at the debug level. This can make certain integration/e2e tests fail unexpectedly if the log level is set to any other level. It seems natural that the logged success message should be at the info level. Change-Id: I8ad961a5b55b7a353f329218d9090457ed1bf0be Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
1 parent 94ac268 commit fab5d97

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

integration/runner/peer_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ var _ = Describe("Peer", func() {
162162
By("fetch channel block file")
163163
fetchRun := components.Peer()
164164
fetchRun.ConfigDir = tempDir
165-
fetchRun.LogLevel = "debug"
166165
fetchRun.MSPConfigPath = filepath.Join(cryptoDir, "peerOrganizations", "org1.example.com", "users", "Admin@org1.example.com", "msp")
167166
fRunner := fetchRun.FetchChannel("mychan", filepath.Join(tempDir, "mychan.block"), "0", "127.0.0.1:8050")
168167
execute(fRunner)

integration/world/config.go

-2
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ func (w *World) SetupChannel() error {
218218

219219
p = w.Components.Peer()
220220
p.ConfigDir = filepath.Join(w.Rootpath, "org1.example.com_0")
221-
p.LogLevel = "debug"
222221
p.MSPConfigPath = filepath.Join(w.Rootpath, "crypto", "peerOrganizations", "org1.example.com", "users", "Admin@org1.example.com", "msp")
223222
adminRunner := p.CreateChannel(w.Deployment.Channel, filepath.Join(w.Rootpath, fmt.Sprintf("%s_tx.pb", w.Deployment.Channel)), w.Deployment.Orderer)
224223
execute(adminRunner)
@@ -227,7 +226,6 @@ func (w *World) SetupChannel() error {
227226
for peer := 0; peer < peerOrg.PeerCount; peer++ {
228227
p = w.Components.Peer()
229228
peerDir := fmt.Sprintf("%s_%d", peerOrg.Domain, peer)
230-
p.LogLevel = "debug"
231229
p.ConfigDir = filepath.Join(w.Rootpath, peerDir)
232230
p.MSPConfigPath = filepath.Join(w.Rootpath, "crypto", "peerOrganizations", peerOrg.Domain, "users", fmt.Sprintf("Admin@%s", peerOrg.Domain), "msp")
233231
adminRunner = p.FetchChannel(w.Deployment.Channel, filepath.Join(w.Rootpath, peerDir, fmt.Sprintf("%s_block.pb", w.Deployment.Channel)), "0", w.Deployment.Orderer)

peer/chaincode/install.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func install(msg proto.Message, cf *ChaincodeCmdFactory) error {
8484
}
8585

8686
if proposalResponse != nil {
87-
logger.Debugf("Installed remotely %v", proposalResponse)
87+
logger.Infof("Installed remotely %v", proposalResponse)
8888
}
8989

9090
return nil

peer/channel/deliverclient.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ func (r *deliverClient) readBlock() (*common.Block, error) {
108108

109109
switch t := msg.Type.(type) {
110110
case *ab.DeliverResponse_Status:
111-
logger.Debugf("Got status: %v", t)
111+
logger.Infof("Got status: %v", t)
112112
return nil, fmt.Errorf("can't read the block: %v", t)
113113
case *ab.DeliverResponse_Block:
114-
logger.Debugf("Received block: %v", t.Block.Header.Number)
114+
logger.Infof("Received block: %v", t.Block.Header.Number)
115115
r.client.Recv() // Flush the success message
116116
return t.Block, nil
117117
default:

0 commit comments

Comments
 (0)