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

Expose log.With func #381

Merged
merged 3 commits into from
Mar 12, 2021
Merged

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Mar 11, 2021

Expose log.With helper func which was hidden behind internal before. Simple func call won't work here because it makes package cycle, therefore I moved entire withLogger to external log package (it is still unexported though).

With this change users will be able to do something like this in workflow code:

logger := log.With(workflow.GetLogger(ctx), "customKeyName", "customKeyValue")
logger.Info("message")

same as we do internally.

@alexshtin alexshtin enabled auto-merge (squash) March 12, 2021 02:11
@alexshtin alexshtin merged commit 5bf0710 into temporalio:master Mar 12, 2021
@alexshtin alexshtin deleted the feature/expose-log-with branch March 12, 2021 02:12
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