From 620fa72f102480aeb233f54fb9bba39cfde2a56c Mon Sep 17 00:00:00 2001 From: Ryan Walls Date: Mon, 7 Nov 2022 06:37:44 -0700 Subject: [PATCH] Provide better custom logger example in README (#911) --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index bc844355a..0f9da92d6 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Although the Go SDK does not support most third-party logging solutions natively package main import ( "github.com/sirupsen/logrus" + "go.temporal.io/sdk/client" logrusadapter "logur.dev/adapter/logrus" "logur.dev/logur" ) @@ -32,6 +33,11 @@ import ( func main() { // feed this logger into Temporal logger := logur.LoggerToKV(logrusadapter.New(logrus.New())) + clientOptions := client.Options{ + Logger: logger, + } + temporalClient, err := client.Dial(clientOptions) + // ... } ```