From 58afbd4a2e883d961b2f352f14c22403bc918726 Mon Sep 17 00:00:00 2001 From: Steve Willoughby Date: Wed, 1 May 2024 11:43:11 -0700 Subject: [PATCH] fix example --- v3/integrations/logcontext-v2/nrslog/example/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v3/integrations/logcontext-v2/nrslog/example/main.go b/v3/integrations/logcontext-v2/nrslog/example/main.go index 9ee09ff8e..2544fb3b6 100644 --- a/v3/integrations/logcontext-v2/nrslog/example/main.go +++ b/v3/integrations/logcontext-v2/nrslog/example/main.go @@ -1,10 +1,10 @@ package main import ( + "context" "log/slog" "os" "time" - "context" "github.com/newrelic/go-agent/v3/integrations/logcontext-v2/nrslog" "github.com/newrelic/go-agent/v3/newrelic" @@ -26,12 +26,12 @@ func main() { txn := app.StartTransaction("example transaction") ctx := newrelic.NewContext(context.Background(), txn) - - txnLogger.InfoContext(ctx, "I am a log inside a transaction") + + log.InfoContext(ctx, "I am a log inside a transaction") // pretend to do some work time.Sleep(500 * time.Millisecond) - txnLogger.Warn("Uh oh, something important happened!") + log.Warn("Uh oh, something important happened!") txn.End() log.Info("All Done!")