Skip to content

Commit b5f9f0a

Browse files
committed
[FAB-3390] Override log level - cauthdsl and policies
This CR adds the ability to override the log levels for the `cauthdsl` and `policies` loggers as they generate a large amount of output. Change-Id: Ib4ef569f13a8b7a93447d8f58c7f24f9626cc738 Signed-off-by: Will Lahti <[email protected]>
1 parent 01aa829 commit b5f9f0a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

common/policies/policy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const (
6060
BlockValidation = PathSeparator + ChannelPrefix + PathSeparator + OrdererPrefix + PathSeparator + "BlockValidation"
6161
)
6262

63-
var logger = flogging.MustGetLogger("common/policies")
63+
var logger = flogging.MustGetLogger("policies")
6464

6565
// Policy is used to determine if a signature is valid
6666
type Policy interface {

peer/node/start.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func serve(args []string) error {
266266

267267
// set the logging level for specific modules defined via environment
268268
// variables or core.yaml
269-
overrideLogModules := []string{"msp", "gossip", "ledger"}
269+
overrideLogModules := []string{"msp", "gossip", "ledger", "cauthdsl", "policies"}
270270
for _, module := range overrideLogModules {
271271
err = common.SetLogLevelFromViper(module)
272272
if err != nil {

sampleconfig/core.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ logging:
2626
peer: info
2727

2828
# Override levels for various 'peer' modules
29+
cauthdsl: warning
2930
gossip: warning
3031
ledger: info
3132
msp: warning
33+
policies: warning
3234

3335
# Error handling framework log level - when set to DEBUG, a callstack will
3436
# be appended to all errors generated using the fabric/common/errors package
@@ -204,7 +206,7 @@ peer:
204206
# establishing TLS connection
205207
rootcert:
206208
file: peer/tls.crt
207-
209+
208210
# The server name use to verify the hostname returned by TLS handshake
209211
serverhostoverride:
210212

0 commit comments

Comments
 (0)