Skip to content

Commit

Permalink
[FAB-13283] Update sample code for commercial paper
Browse files Browse the repository at this point in the history
- Update CORE_LOGGING_LEVEL to FABRIC_LOGGING_SPEC
- Add port as an argument in case default port is used

Change-Id: I29725a100a095b2b6f2ec6262e7b70730445385e
Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
  • Loading branch information
wenjianqiao committed Dec 14, 2018
1 parent 89fff6d commit ab46e35
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=info
- FABRIC_LOGGING_SPEC=info
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@

if [ -z "$1" ]; then
DOCKER_NETWORK=basicnetwork_basic
else
else
DOCKER_NETWORK="$1"
fi

echo Starting monitoring on all containers on the network ${DOCKER_NETWORK}
if [ -z "$2" ]; then
PORT=8000
else
PORT="$2"
fi

echo Starting monitoring on all containers on the network ${DOCKER_NETWORK}

docker kill logspout 2> /dev/null 1>&2 || true
docker rm logspout 2> /dev/null 1>&2 || true

docker run -d --name="logspout" \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--publish=127.0.0.1:8000:80 \
--publish=127.0.0.1:${PORT}:80 \
--network ${DOCKER_NETWORK} \
gliderlabs/logspout
gliderlabs/logspout
sleep 3
curl http://127.0.0.1:8000/logs
curl http://127.0.0.1:${PORT}/logs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=info
- FABRIC_LOGGING_SPEC=info
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@

if [ -z "$1" ]; then
DOCKER_NETWORK=basicnetwork_basic
else
else
DOCKER_NETWORK="$1"
fi

echo Starting monitoring on all containers on the network ${DOCKER_NETWORK}
if [ -z "$2" ]; then
PORT=8000
else
PORT="$2"
fi

echo Starting monitoring on all containers on the network ${DOCKER_NETWORK}

docker kill logspout 2> /dev/null 1>&2 || true
docker rm logspout 2> /dev/null 1>&2 || true

docker run -d --name="logspout" \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--publish=127.0.0.1:8000:80 \
--publish=127.0.0.1:${PORT}:80 \
--network ${DOCKER_NETWORK} \
gliderlabs/logspout
gliderlabs/logspout
sleep 3
curl http://127.0.0.1:8000/logs
curl http://127.0.0.1:${PORT}/logs

0 comments on commit ab46e35

Please sign in to comment.