From 3b2eb1e4fbc6a9f199b8756263bab0cd57ec4d00 Mon Sep 17 00:00:00 2001 From: "Franky W." Date: Fri, 21 Mar 2025 10:30:27 +0100 Subject: [PATCH] Update nrslog example nrslog in logs in context used a deprecated version of the nrslog API. We update the example to reflect better how to use it using the new API so that users can reference it and integrate the new API in their code. --- v3/integrations/logcontext-v2/nrslog/example/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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")