Commit 52be5856 authored by Will Lahti's avatar Will Lahti
Browse files

Replace / in logger names with dots



FAB-12610 #done

Change-Id: If71efa93555adb3445945c0324acfda4cc262974
Signed-off-by: default avatarWill Lahti <wtlahti@us.ibm.com>
parent d5c6cbcd
......@@ -12,9 +12,7 @@ import (
"github.com/pkg/errors"
)
const pkgLogID = "common/capabilities"
var logger = flogging.MustGetLogger(pkgLogID)
var logger = flogging.MustGetLogger("common.capabilities")
// provider is the 'plugin' parameter for registry.
type provider interface {
......
......@@ -17,7 +17,7 @@ import (
"github.com/pkg/errors"
)
var logger = flogging.MustGetLogger("common/channelconfig")
var logger = flogging.MustGetLogger("common.channelconfig")
// RootGroupKey is the key for namespacing the channel config, especially for
// policy evaluation.
......
......@@ -21,7 +21,7 @@ import (
"github.com/hyperledger/fabric/protos/utils"
)
var logger = flogging.MustGetLogger("common/configtx/test")
var logger = flogging.MustGetLogger("common.configtx.test")
// MakeGenesisBlock creates a genesis block using the test templates for the given chainID
func MakeGenesisBlock(chainID string) (*cb.Block, error) {
......
......@@ -17,7 +17,7 @@ import (
"github.com/pkg/errors"
)
var logger = flogging.MustGetLogger("common/configtx")
var logger = flogging.MustGetLogger("common.configtx")
// Constraints for valid channel and config IDs
var (
......
......@@ -25,7 +25,7 @@ import (
"github.com/pkg/errors"
)
var logger = flogging.MustGetLogger("common/deliver")
var logger = flogging.MustGetLogger("common.deliver")
//go:generate counterfeiter -o mock/chain_manager.go -fake-name ChainManager . ChainManager
......
......@@ -14,9 +14,7 @@ import (
ab "github.com/hyperledger/fabric/protos/orderer"
)
const pkgLogID = "common/ledger/blockledger/file"
var logger = flogging.MustGetLogger(pkgLogID)
var logger = flogging.MustGetLogger("common.ledger.blockledger.file")
// FileLedger is a struct used to interact with a node's ledger
type FileLedger struct {
......
......@@ -11,7 +11,6 @@ import (
"fmt"
"io/ioutil"
"os"
"strings"
"testing"
"github.com/hyperledger/fabric/common/flogging"
......@@ -28,7 +27,7 @@ import (
var genesisBlock = cb.NewBlock(0, nil)
func init() {
flogging.ActivateSpec(strings.Replace(pkgLogID, "/", ".", -1) + "=DEBUG")
flogging.ActivateSpec("common.ledger.blockledger.file=DEBUG")
}
type testEnv struct {
......
......@@ -21,9 +21,7 @@ import (
"github.com/pkg/errors"
)
const pkgLogID = "orderer/ledger/jsonledger"
var logger = flogging.MustGetLogger(pkgLogID)
var logger = flogging.MustGetLogger("common.ledger.blockledger.json")
var closedChan chan struct{}
var fileLock sync.Mutex
......
......@@ -9,7 +9,6 @@ package jsonledger
import (
"io/ioutil"
"os"
"strings"
"testing"
"time"
......@@ -24,7 +23,7 @@ import (
var genesisBlock = cb.NewBlock(0, nil)
func init() {
flogging.ActivateSpec(strings.Replace(pkgLogID, "/", ".", -1) + "=DEBUG")
flogging.ActivateSpec("common.ledger.blockledger.json=DEBUG")
}
type testEnv struct {
......
......@@ -17,9 +17,7 @@ import (
"github.com/pkg/errors"
)
const pkgLogID = "orderer/ledger/ramledger"
var logger = flogging.MustGetLogger(pkgLogID)
var logger = flogging.MustGetLogger("common.ledger.blockledger.ram")
type cursor struct {
list *simpleList
......
......@@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0
package ramledger
import (
"strings"
"testing"
"github.com/hyperledger/fabric/common/flogging"
......@@ -20,7 +19,7 @@ import (
var genesisBlock = cb.NewBlock(0, nil)
func init() {
flogging.ActivateSpec(strings.Replace(pkgLogID, "/", ".", -1) + "=DEBUG")
flogging.ActivateSpec("common.ledger.blockledger.ram=DEBUG")
}
func newTestChain(maxSize int) *ramLedger {
......
......@@ -15,7 +15,7 @@ import (
"github.com/hyperledger/fabric/protos/common"
)
var logger = flogging.MustGetLogger("policies/inquire")
var logger = flogging.MustGetLogger("policies.inquire")
type inquireableSignaturePolicy struct {
sigPol *common.SignaturePolicyEnvelope
......
......@@ -26,14 +26,13 @@ import (
)
const (
pkgLogID = "common/tools/configtxgen/encoder"
ordererAdminsPolicyName = "/Channel/Orderer/Admins"
msgVersion = int32(0)
epoch = 0
)
var logger = flogging.MustGetLogger(pkgLogID)
var logger = flogging.MustGetLogger("common.tools.configtxgen.encoder")
const (
// ConsensusTypeSolo identifies the solo consensus implementation.
......
......@@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0
package encoder
import (
"strings"
"testing"
"github.com/golang/protobuf/proto"
......@@ -27,7 +26,7 @@ import (
)
func init() {
flogging.ActivateSpec(strings.Replace(pkgLogID, "/", ".", -1) + "=DEBUG")
flogging.ActivateSpec("common.tools.configtxgen.encoder=DEBUG")
}
func hasModPolicySet(t *testing.T, groupName string, cg *cb.ConfigGroup) {
......
......@@ -22,17 +22,15 @@ import (
)
const (
pkgLogID = "common.tools.configtxgen.localconfig"
// Prefix identifies the prefix for the configtxgen-related ENV vars.
Prefix string = "CONFIGTX"
)
var logger = flogging.MustGetLogger(pkgLogID)
var logger = flogging.MustGetLogger("common.tools.configtxgen.localconfig")
var configName = strings.ToLower(Prefix)
func init() {
flogging.InitFromSpec(pkgLogID + "=error")
flogging.InitFromSpec("common.tools.configtxgen.localconfig=error")
}
const (
......
......@@ -28,7 +28,7 @@ import (
var exitCode = 0
var logger = flogging.MustGetLogger("common/tools/configtxgen")
var logger = flogging.MustGetLogger("common.tools.configtxgen")
func doOutputBlock(config *genesisconfig.Profile, channelID string, outputBlock string) error {
pgen := encoder.New(config)
......
......@@ -18,7 +18,7 @@ import (
var (
// Logger is the logging instance for this package.
// It's exported because the tests override its backend
Logger = flogging.MustGetLogger("discovery/lifecycle")
Logger = flogging.MustGetLogger("discovery.lifecycle")
)
// Lifecycle manages information regarding chaincode lifecycle
......
......@@ -21,7 +21,7 @@ import (
"github.com/pkg/errors"
)
var logger = flogging.MustGetLogger("chaincode/persistence")
var logger = flogging.MustGetLogger("chaincode.persistence")
// IOReadWriter defines the interface needed for reading, writing, removing, and
// checking for existence of a specified file
......
......@@ -78,7 +78,7 @@ type TxValidator struct {
Vscc vsccValidator
}
var logger = flogging.MustGetLogger("committer/txvalidator")
var logger = flogging.MustGetLogger("committer.txvalidator")
type blockValidationRequest struct {
block *common.Block
......
......@@ -20,7 +20,7 @@ import (
"github.com/hyperledger/fabric/core/handlers/validation/api"
)
var logger = flogging.MustGetLogger("core/handlers")
var logger = flogging.MustGetLogger("core.handlers")
// Registry defines an object that looks up
// handlers by name
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment