Skip to content

Commit c21bbba

Browse files
committed
Update samples to use new logging env variables
FAB-12669 #done Change-Id: Ibb50cc77cb64c3cc138af9afde7273636f34b816 Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
1 parent 33f064f commit c21bbba

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

balance-transfer/artifacts/base.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
# bridge network as the peers
1414
# https://docs.docker.com/compose/networking/
1515
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=artifacts_default
16-
- CORE_LOGGING_LEVEL=DEBUG
16+
- FABRIC_LOGGING_SPEC=DEBUG
1717
- CORE_PEER_GOSSIP_USELEADERELECTION=true
1818
- CORE_PEER_GOSSIP_ORGLEADER=false
1919
# The following setting skips the gossip handshake since we are

balance-transfer/artifacts/docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
container_name: orderer.example.com
4646
image: hyperledger/fabric-orderer
4747
environment:
48-
- ORDERER_GENERAL_LOGLEVEL=debug
48+
- FABRIC_LOGGING_SPEC=debug
4949
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
5050
- ORDERER_GENERAL_GENESISMETHOD=file
5151
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block

basic-network/docker-compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ services:
2929
container_name: orderer.example.com
3030
image: hyperledger/fabric-orderer
3131
environment:
32-
- ORDERER_GENERAL_LOGLEVEL=info
32+
- FABRIC_LOGGING_SPEC=info
3333
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
3434
- ORDERER_GENERAL_GENESISMETHOD=file
3535
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
@@ -52,7 +52,7 @@ services:
5252
environment:
5353
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
5454
- CORE_PEER_ID=peer0.org1.example.com
55-
- CORE_LOGGING_PEER=info
55+
- FABRIC_LOGGING_SPEC=info
5656
- CORE_CHAINCODE_LOGGING_LEVEL=info
5757
- CORE_PEER_LOCALMSPID=Org1MSP
5858
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
@@ -105,7 +105,7 @@ services:
105105
environment:
106106
- GOPATH=/opt/gopath
107107
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
108-
- CORE_LOGGING_LEVEL=info
108+
- FABRIC_LOGGING_SPEC=info
109109
- CORE_PEER_ID=cli
110110
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
111111
- CORE_PEER_LOCALMSPID=Org1MSP

chaincode-docker-devmode/docker-compose-simple.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
container_name: orderer
66
image: hyperledger/fabric-orderer
77
environment:
8-
- ORDERER_GENERAL_LOGLEVEL=debug
8+
- FABRIC_LOGGING_SPEC=debug
99
- ORDERER_GENERAL_LISTENADDRESS=orderer
1010
- ORDERER_GENERAL_GENESISMETHOD=file
1111
- ORDERER_GENERAL_GENESISFILE=orderer.block
@@ -29,7 +29,7 @@ services:
2929
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer:7051
3030
- CORE_PEER_LOCALMSPID=DEFAULT
3131
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
32-
- CORE_LOGGING_LEVEL=DEBUG
32+
- FABRIC_LOGGING_SPEC=DEBUG
3333
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp
3434
volumes:
3535
- /var/run/:/host/var/run/
@@ -49,7 +49,7 @@ services:
4949
environment:
5050
- GOPATH=/opt/gopath
5151
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
52-
- CORE_LOGGING_LEVEL=DEBUG
52+
- FABRIC_LOGGING_SPEC=DEBUG
5353
- CORE_PEER_ID=cli
5454
- CORE_PEER_ADDRESS=peer:7051
5555
- CORE_PEER_LOCALMSPID=DEFAULT
@@ -72,7 +72,7 @@ services:
7272
environment:
7373
- GOPATH=/opt/gopath
7474
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
75-
- CORE_LOGGING_LEVEL=DEBUG
75+
- FABRIC_LOGGING_SPEC=DEBUG
7676
- CORE_PEER_ID=example02
7777
- CORE_PEER_ADDRESS=peer:7051
7878
- CORE_PEER_LOCALMSPID=DEFAULT

fabric-ca/makeDocker.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function writeOrderer {
238238
- ORDERER_GENERAL_TLS_ROOTCAS=[$CA_CHAINFILE]
239239
- ORDERER_GENERAL_TLS_CLIENTAUTHREQUIRED=true
240240
- ORDERER_GENERAL_TLS_CLIENTROOTCAS=[$CA_CHAINFILE]
241-
- ORDERER_GENERAL_LOGLEVEL=debug
241+
- FABRIC_LOGGING_SPEC=debug
242242
- ORDERER_DEBUG_BROADCASTTRACEDIR=$LOGDIR
243243
- ORG=$ORG
244244
- ORG_ADMIN_CERT=$ORG_ADMIN_CERT
@@ -272,7 +272,7 @@ function writePeer {
272272
- CORE_PEER_MSPCONFIGPATH=$MYHOME/msp
273273
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
274274
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_${NETWORK}
275-
- CORE_LOGGING_LEVEL=DEBUG
275+
- FABRIC_LOGGING_SPEC=DEBUG
276276
- CORE_PEER_TLS_ENABLED=true
277277
- CORE_PEER_TLS_CERT_FILE=$MYHOME/tls/server.crt
278278
- CORE_PEER_TLS_KEY_FILE=$MYHOME/tls/server.key

fabric-ca/scripts/env.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function initOrdererVars {
158158
MYHOME=/etc/hyperledger/orderer
159159

160160
export FABRIC_CA_CLIENT=$MYHOME
161-
export ORDERER_GENERAL_LOGLEVEL=debug
161+
export FABRIC_LOGGING_SPEC=debug
162162
export ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
163163
export ORDERER_GENERAL_GENESISMETHOD=file
164164
export ORDERER_GENERAL_GENESISFILE=$GENESIS_BLOCK_FILE
@@ -217,8 +217,8 @@ function initPeerVars {
217217
# https://docs.docker.com/compose/networking/
218218
#export CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_${NETWORK}
219219
export CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_${NETWORK}
220-
# export CORE_LOGGING_LEVEL=ERROR
221-
export CORE_LOGGING_LEVEL=DEBUG
220+
# export FABRIC_LOGGING_SPEC=ERROR
221+
export FABRIC_LOGGING_SPEC=DEBUG
222222
export CORE_PEER_TLS_ENABLED=true
223223
export CORE_PEER_TLS_CLIENTAUTHREQUIRED=true
224224
export CORE_PEER_TLS_ROOTCERT_FILE=$CA_CHAINFILE

fabric-ca/scripts/run-fabric.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function main {
7575
logr "Sending invoke transaction to $PEER_HOST ..."
7676
peer chaincode invoke -C $CHANNEL_NAME -n mycc -c '{"Args":["invoke","a","b","10"]}' $ORDERER_CONN_ARGS
7777

78-
## Install chaincode on 2nd peer of 2nd org
78+
# Install chaincode on 2nd peer of 2nd org
7979
initPeerVars ${PORGS[1]} 2
8080
installChaincode
8181

@@ -115,7 +115,7 @@ function createChannel {
115115
initPeerVars ${PORGS[0]} 1
116116
switchToAdminIdentity
117117
logr "Creating channel '$CHANNEL_NAME' on $ORDERER_HOST ..."
118-
peer channel create --logging-level=DEBUG -c $CHANNEL_NAME -f $CHANNEL_TX_FILE $ORDERER_CONN_ARGS
118+
FABRIC_LOGGING_SPEC=debug peer channel create -c $CHANNEL_NAME -f $CHANNEL_TX_FILE $ORDERER_CONN_ARGS
119119
}
120120

121121
# Enroll as a fabric admin and join the channel

first-network/base/docker-compose-base.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
container_name: orderer.example.com
1212
image: hyperledger/fabric-orderer:$IMAGE_TAG
1313
environment:
14-
- ORDERER_GENERAL_LOGLEVEL=INFO
14+
- FABRIC_LOGGING_SPEC=INFO
1515
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
1616
- ORDERER_GENERAL_GENESISMETHOD=file
1717
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block

first-network/base/peer-base.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ services:
1414
# bridge network as the peers
1515
# https://docs.docker.com/compose/networking/
1616
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
17-
- CORE_LOGGING_LEVEL=INFO
18-
#- CORE_LOGGING_LEVEL=DEBUG
17+
- FABRIC_LOGGING_SPEC=INFO
18+
#- FABRIC_LOGGING_SPEC=DEBUG
1919
- CORE_PEER_TLS_ENABLED=true
2020
- CORE_PEER_GOSSIP_USELEADERELECTION=true
2121
- CORE_PEER_GOSSIP_ORGLEADER=false

first-network/docker-compose-cli.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ services:
6565
environment:
6666
- GOPATH=/opt/gopath
6767
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
68-
#- CORE_LOGGING_LEVEL=DEBUG
69-
- CORE_LOGGING_LEVEL=INFO
68+
#- FABRIC_LOGGING_SPEC=DEBUG
69+
- FABRIC_LOGGING_SPEC=INFO
7070
- CORE_PEER_ID=cli
7171
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
7272
- CORE_PEER_LOCALMSPID=Org1MSP

first-network/docker-compose-org3.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ services:
6666
environment:
6767
- GOPATH=/opt/gopath
6868
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
69-
- CORE_LOGGING_LEVEL=INFO
70-
#- CORE_LOGGING_LEVEL=DEBUG
69+
- FABRIC_LOGGING_SPEC=INFO
70+
#- FABRIC_LOGGING_SPEC=DEBUG
7171
- CORE_PEER_ID=Org3cli
7272
- CORE_PEER_ADDRESS=peer0.org3.example.com:7051
7373
- CORE_PEER_LOCALMSPID=Org3MSP

0 commit comments

Comments
 (0)