Skip to content

Commit

Permalink
[FAB-3145] Override log level for ledger at peer start
Browse files Browse the repository at this point in the history
This CR overrides the log level for all modules with ledger in their
module name during peer start. The value can be set in core.yaml using
`logging.ledger` or by using the CORE_LOGGING_LEDGER environment
variable.

Change-Id: Ia869573d7bb13a93468b70e5480e996b351775cb
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
  • Loading branch information
wlahti committed Apr 26, 2017
1 parent 5f91834 commit 01aa829
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions peer/node/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ func serve(args []string) error {
logger.Infof("Started peer with ID=[%s], network ID=[%s], address=[%s]",
peerEndpoint.Id, viper.GetString("peer.networkId"), peerEndpoint.Address)

// set the logging level for specific modules defined in core.yaml.
// TODO Add calls to set 'ledger' module loggers
overrideLogModules := []string{"msp", "gossip"}
// set the logging level for specific modules defined via environment
// variables or core.yaml
overrideLogModules := []string{"msp", "gossip", "ledger"}
for _, module := range overrideLogModules {
err = common.SetLogLevelFromViper(module)
if err != nil {
Expand Down

0 comments on commit 01aa829

Please sign in to comment.