Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better custom logger example in README #911

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

ryanwalls
Copy link
Contributor

What was changed

Updated the README with a more helpful logging example.

Why?

The current example did not make it clear how to "feed the logger" into Temporal. Grabbed the better example from https://docs.temporal.io/go/how-to-set-clientoptions-in-go/#logger.

Checklist

  1. Closes
    n/a

  2. How was this tested:

n/a

  1. Any docs updates needed?

Done

@ryanwalls ryanwalls requested a review from a team as a code owner September 15, 2022 16:09
@CLAassistant
Copy link

CLAassistant commented Sep 15, 2022

CLA assistant check
All committers have signed the CLA.

@@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just remove this section (notice there aren't other examples/docs here in the README) and that way people will look at https://github.com/temporalio/samples-go instead (specifically https://github.com/temporalio/samples-go/tree/main/zapadapter).

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tough call. On the one hand I agree duplicating docs in multiple places could lead to staleness and confusion. On the other hand, there are people who find the Temporal project through SDKs. So this may be their first exposure to Temporal... and a very austere README may send the wrong message.

Perhaps some of the sections can be replaced with links to other docs, but keep the section titles?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and a very austere README may send the wrong message.

The README is already very tiny compared to docs.

Perhaps some of the sections can be replaced with links to other docs, but keep the section titles?

There aren't really any sections of note besides this one.

I can merge this and we can just table the idea of altering the README more drastically. Sound good?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging for now is fine. Or you can just replace the one section we are talking about with a link to the docs for the logger. I'm good either way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can merge. Can you update the branch w/ master? and get CI passing?

The current example did not make it clear how to "feed the logger" into Temporal.  Grabbed the better example from https://docs.temporal.io/go/how-to-set-clientoptions-in-go/#logger.
@cretz cretz merged commit 620fa72 into temporalio:master Nov 7, 2022
@cretz
Copy link
Member

cretz commented Nov 7, 2022

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants