diff --git a/v3/integrations/logcontext-v2/nrslog/example/main.go b/v3/integrations/logcontext-v2/nrslog/example/main.go index 247d018d4..9f9dfac37 100644 --- a/v3/integrations/logcontext-v2/nrslog/example/main.go +++ b/v3/integrations/logcontext-v2/nrslog/example/main.go @@ -21,7 +21,10 @@ func main() { } app.WaitForConnection(time.Second * 5) - log := slog.New(nrslog.TextHandler(app, os.Stdout, &slog.HandlerOptions{})) + + handler := slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}) + nrHandler := nrslog.WrapHandler(app, handler) + log := slog.New(nrHandler) log.Info("I am a log message")