Skip to content

Commit

Permalink
Provide better custom logger example in README (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwalls committed Nov 7, 2022
1 parent 97ed634 commit 620fa72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@ 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"
)

func main() {
// feed this logger into Temporal
logger := logur.LoggerToKV(logrusadapter.New(logrus.New()))
clientOptions := client.Options{
Logger: logger,
}
temporalClient, err := client.Dial(clientOptions)
// ...
}
```

Expand Down

0 comments on commit 620fa72

Please sign in to comment.