Skip to content

Commit

Permalink
[FAB-8506] Log which capabilities are on
Browse files Browse the repository at this point in the history
A fairly obvious oversight in the capabilities code is that nowhere are
the capabilities which are on actually logged.  This is a trivial fix,
and will help serviceability considerably.  This applies for both
ordererr and peer.

Sample log output:

[common/capabilities] Supported -> DEBU 09b Orderer capability V1_1 is
    supported and is enabled
[common/capabilities] Supported -> DEBU 09c Channel capability V1_1 is
    supported and is enabled

Change-Id: Idccf7f4f0265d88d77374e42406997d18ee5c247
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Feb 24, 2018
1 parent 2bb5269 commit 271dea5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/capabilities/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func newRegistry(p provider, capabilities map[string]*cb.Capability) *registry {
func (r *registry) Supported() error {
for capabilityName := range r.capabilities {
if r.provider.HasCapability(capabilityName) {
logger.Debugf("%s capability %s is supported and is enabled", r.provider.Type(), capabilityName)
continue
}

Expand Down

0 comments on commit 271dea5

Please sign in to comment.