Skip to content

Commit

Permalink
[FAB-3687] rotate /example/cluster logs
Browse files Browse the repository at this point in the history
The current code configures the peer to be quite chatty
and we do not place any limits on logfile size.  Therefore,
it is quite easy to fill up disk space.  This patch fixes
this by both reducing the verbosity of the peers as well
as placing size/rotation limits in the docker configuration.

Fixes FAB-3687

Change-Id: I7bf41c240f4aed0f46014df7be2f8e4ebcb600a9
Signed-off-by: Greg Haskins <[email protected]>
  • Loading branch information
ghaskins committed May 6, 2017
1 parent 1d31ce3 commit 875f8a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions examples/cluster/compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ services:
- FABRIC_CA_SERVER_TLS_ENABLED=${TLS_ENABLED}
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server/tls/ca.crt
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server/tls/ca.key
logging: &logging
driver: json-file
options:
max-size: "25m"
max-file: "2"
volumes:
- ../build/nodes/ca/tls:/etc/hyperledger/fabric-ca-server/tls

Expand All @@ -19,6 +24,8 @@ services:
dns_search: .
environment:
- ORDERER_GENERAL_TLS_ENABLED=${TLS_ENABLED}
logging:
<<: *logging
volumes:
- ../build/nodes/orderer:/etc/hyperledger/fabric

Expand All @@ -32,6 +39,8 @@ services:
- CORE_PEER_ADDRESS=peer1:7051
- CORE_PEER_GOSSIP_ENDPOINT=peer1:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.net:7051
logging:
<<: *logging
volumes:
- ../build/nodes/peer1:/etc/hyperledger/fabric
depends_on:
Expand All @@ -47,6 +56,8 @@ services:
- CORE_PEER_ADDRESS=peer2:7051
- CORE_PEER_GOSSIP_ENDPOINT=peer2:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer2.org1.net:7051
logging:
<<: *logging
volumes:
- ../build/nodes/peer2:/etc/hyperledger/fabric
depends_on:
Expand All @@ -63,6 +74,8 @@ services:
- CORE_PEER_ADDRESS=peer3:7051
- CORE_PEER_GOSSIP_ENDPOINT=peer3:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer3.org1.net:7051
logging:
<<: *logging
volumes:
- ../build/nodes/peer3:/etc/hyperledger/fabric
depends_on:
Expand All @@ -79,6 +92,8 @@ services:
- CORE_PEER_ADDRESS=peer4:7051
- CORE_PEER_GOSSIP_ENDPOINT=peer4:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer4.org1.net:7051
logging:
<<: *logging
volumes:
- ../build/nodes/peer4:/etc/hyperledger/fabric
depends_on:
Expand Down
6 changes: 3 additions & 3 deletions examples/cluster/config/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ logging:
# Developers: Please see fabric/docs/Setup/logging-control.md for more
# options.
peer: warning
node: info
node: warning
network: warning
version: warning
protoutils: debug
protoutils: warning
error: warning
msp: warning
gossip: debug
gossip: warning

format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'

Expand Down

0 comments on commit 875f8a2

Please sign in to comment.