Skip to content

Commit

Permalink
Fix: fixed compile time error in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Dec 14, 2023
1 parent 9d5b605 commit 8e18278
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions log/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ func TestLogger(t *testing.T) {
logger.SetLogLevel(log.LevelTrace)
logger.LogTrace("created chain")

networkLogger, shutdownNetworkLogger := logger.NewChildLogger("network")
defer shutdownNetworkLogger()
networkLogger := logger.NewChildLogger("network")
defer networkLogger.UnsubscribeFromParentLogger()
networkLogger.SetLogLevel(log.LevelInfo)
networkLogger.LogInfo("instantiated chain (invisible)", "id", 1)

chainLogger, shutdownChainLogger := logger.NewChildLogger("chain1")
defer shutdownChainLogger()
chainLogger := logger.NewChildLogger("chain1")
defer chainLogger.UnsubscribeFromParentLogger()
chainLogger.SetLogLevel(log.LevelDebug)
chainLogger.LogDebug("attested weight updated (visible)", "oldWeight", 7, "newWeight", 10)
logger.LogTrace("shutdown")
Expand Down Expand Up @@ -80,7 +80,7 @@ func NewTestObject(logger log.Logger) *TestObject {
IsEvicted: reactive.NewEvent(),
}

t.Logger, _ = logger.NewEntityLogger("TestObject")
t.Logger = logger.NewChildLogger("TestObject", true)

t.ImportantValue1.LogUpdates(t.Logger, log.LevelInfo, "ImportantValue1")
t.ImportantValue2.LogUpdates(t.Logger, log.LevelInfo, "ImportantValue2")
Expand Down

0 comments on commit 8e18278

Please sign in to comment.