Skip to content

Commit

Permalink
revise logger contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
timwu20 committed Jan 10, 2025
1 parent 99fba6e commit 981f2a8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/client/db/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"golang.org/x/exp/slices"
)

var logger = log.NewFromGlobal(log.AddContext("client", "db"))
var logger = log.NewFromGlobal(log.AddContext("pkg", "client/db"))

// Block pruning settings.
type BlocksPruning interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/client/state-db/noncanonical.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/gammazero/deque"
)

var logger = log.NewFromGlobal(log.AddContext("client", "state-db"))
var logger = log.NewFromGlobal(log.AddContext("pkg", "client/state-db"))

var lastCanonical = []byte("last_canonical")

Expand Down
2 changes: 1 addition & 1 deletion internal/primitives/consensus/grandpa/grandpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"golang.org/x/exp/constraints"
)

var logger = log.NewFromGlobal(log.AddContext("consensus", "grandpa"))
var logger = log.NewFromGlobal(log.AddContext("pkg", "consensus/grandpa"))

// AuthorityID is the identity of a Grandpa authority.
type AuthorityID = app.Public
Expand Down
2 changes: 1 addition & 1 deletion internal/primitives/trie/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/elastic/go-freelru"
)

var logger = log.NewFromGlobal(log.AddContext("trie", "cache"))
var logger = log.NewFromGlobal(log.AddContext("pkg", "primitives/cache"))

// The maximum number of existing keys in the shared cache that a single local cache
// can promote to the front of the LRU cache in one go.
Expand Down
2 changes: 1 addition & 1 deletion internal/primitives/trie/recorder/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/ChainSafe/gossamer/pkg/trie/triedb"
)

var logger = log.NewFromGlobal(log.AddContext("trie", "recorder"))
var logger = log.NewFromGlobal(log.AddContext("pkg", "primitives/trie/recorder"))

// Stores all the information per transaction.
type transaction[H comparable] struct {
Expand Down

0 comments on commit 981f2a8

Please sign in to comment.